Creating anonymous guest link to images/documents programmatically Sharepoint Online O365

I need to be able to create an anonymous guest link to images or documents programmatically using c# SharePoint web services or something similar. Does anyone know if this can be done if so how? essentially this means creating the guest access token
programmatically ..
If somebody know how to do his it would be much appreciated ?
Thanks in advance 

Hi,
The method you posted seems to the trick it creates to anynonymus links like I was expecting. However interesting scenario has come up when I copy and paste the link in to a normal web browser (desktop or laptop) everything works as expected, but
I when I try the link on a mobile web browser I get the prompt asking me to log in to office 365 not sure why that would be any suggestions ??

Similar Messages

  • Handle image documents in Sharepoint Online as images with preview of the image

    Hi
    When I'm uploading an image(jpg,png,...) into an document library in Sharepoint Online(Office 365) and then search after this image, the search result shows only the file name and a link like .../Forms/DispForm.aspx?ID=1
    I have no preview of the image(also not in hover-view).
    When I go into the document library, I can see the image preview in the hover-view.
    What can I do to show the image preview also in search result?
    The template on this item is the default-item and not image-template. Postings like http://stevemannspath.blogspot.ch/2013/02/sharepoint-2013-image-preview-in-search.html couln't help, perhaps I'm using SPO?
    Image Library is not a solution, Users have to use word, excel and images in the same directory/library.
    best regards
    Christoph

    Hi Christoph,
    From the article you mentioned, it needs add JPG file type to Search Service Application, which was not supported for SharePoint online.
    I tried to add Picture content type to normal document library and tested the issue, it still displayed as item in Search results.
    However, if I created a Picture Library and add Document content type to it, both image and document can be previewed in search result.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to get anonymous guest link "View Only" and "Edit" URL using JSOM or Search API ?

    Hi,
    I need to get list item anonymous guest link View Only and
    Edit URLs (as shown in image below) using JSOM or SharePoint 2013
    Search API.
    the URL will be like this - https://<site URL>/_layouts/15/guestaccess.aspx?guestaccesstoken=yRaYGmE9n
    Any one has any idea how to do achieve this?
    Thanks
    Shakir

    Hi Shakir,
    To get the anonymous guest link “View Only”, we can use SP.ObjectSharingInformation.anonymousViewLink property in sp.js.
    https://msdn.microsoft.com/en-us/library/office/jj246826.aspx
    To get the anonymous guest link “Edit”, we can use SP.ObjectSharingInformation.anonymousEditLink property in sp.js.
    https://msdn.microsoft.com/en-us/library/office/jj246468.aspx
    We can also use REST API to get the guests links:
    _api/web/Lists/getbytitle('library name')/items(item id)/GetObjectSharingInformation?$expand=SharedWithUsersCollection&retrieveAnonymousLinks=true
    Thanks,
    Victoria
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Issue in creating a add link to a document content type on a doc lib name with , / special characters

    hi,
    i am having a  requirement to create/use "add link to a document" content type for a item in the document library.
    so i got  the code from below site :
    http://howtosharepoint.blogspot.in/2010/05/programmatically-add-link-to-document.html
    my issue is, if teh document  library names are single words - like MOM, model, procedures etc this  functionality is working fine and i am able to view the link to a document as an item. 
    but when the doc lib name contains special characters like , or  /  , this link to a  document  content type functionality is NOT working.
    can anyone pls point me whether this is the  actual  issue ? ie, if  the doc lib name contains special chars  like , or /  my
    add link to a document wont work? is there any restrictions/limitations for doc lib names in SharePoint ?
    for eg: my doc lib names are :
    1) Report and analysis, Data
    2) form / template
    3) map/ plot
    help is highly appreciated!

    hi,
     its talking abt the subsite names and  folders and NOT the document librraies.
     is there any link which gives the naming convention / restricted names for  document libs or  splists , from msdn / blogs.technet.
    thnx

  • Links in Word Documents to SharePoint documents

    Our SharePoint site contains Word documents with links to other documents stored in SharePoint.
    When the users open a Word document stored in SharePoint, and then create a link, the users select the files in the "Current Folder" which is the SharePoint Network Drive.  In this case the path is
    \\rcssportal.co.riverside.ca.us\DavWWWRoot\sites\teammate\
    When users then open the Word document, and select a link, they receive a "Cannot open the specified file" pop up. 
    If users do one of the following though, after being authenticated all the links will start working:
    1. In the document library, select "Open with Explorer"
    2. Map a Network Drive to
    \\rcssportal.co.riverside.ca.us\DavWWWRoot\sites\teammate\

    Hi,
    According to your post, my understanding is that you wanted to link in Word Documents to SharePoint documents.
    I try to reproduce the issue, however, I can open the Linked Word Document in the SharePoint Network Drive.
    Please make sure you create Network Drive correctly. For more information, you can refer to:
    Using SharePoint Document Library as a Network Drive
    If the issues still exist, I recommend to select "Open with Explorer" to open the document.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • I am getting error when hovering on document in sharepoint online "sorry there was a problem and we can't open this document.If this happens again, try opening the document in Microsoft Word"

     I am getting error when hovering on document in sharepoint online "sorry there was a problem and we can't open this document.If this happens again, try opening the document in Microsoft Word".I am sure that document is not corrupted and
    all. something it showing the preview and sometimes it throwing this error. I hope this error is intermident. When clicking on the link also it throws this error but on refreshing it working fine. I dont know why it is happening. Please helpme  to resolve
    this issue. 

    Hi Waqas
    Thanks for your help with this. I had a look at both posts, the URL works fine from the WAC server and I am not using a System account to test docs.
    Also, this is a production site that is accessible over the Internet, so we are using https therefore the WOPIZone is external-https.
    Issue #3 in the above blog link does not reflect the same error I see on my servers.
    I also had a look at the information in this link: http://technet.microsoft.com/en-us/library/ff431687.aspx#oauth
    Problem: You receive a "Sorry, there was a problem and we can't open this document" error when you try to view an Office document in Office Web Apps.
    If you added domains to the Allow List by using the
    New-OfficeWebAppsHost cmdlet, make sure you’re accessing Office Web Apps from a host domain that’s in the Allow List. To view the host domains in the Allow List, on the Office Web Apps Server open the Windows PowerShell prompt as an administrator and run
    the Get-OfficeWebAppsHost cmdlet. To add a domain to the Allow List, use the
    New-OfficeWebAppsHost cmdlet.
    I have not added any domains to the Allow list so this did not help either. Should I add the domain?
    Any further help with this is much appreciated.
    Thanks again.
    Yoshi

  • Retriving documents from Sharepoint online by BTS2013 R2

    We are trying to retrieve documents from Sharepoint online by BTS2013 R2  but we are receiving the below error:
    Error:
    The adapter "Windows SharePoint Services" raised an error message. Details "The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for
    communication because it is in the Faulted state.".
    I have crossed checked and user credential is correct. Also the account host instances are running is having access.
    We are facing couple of issues and not sure if we missed an steps to configure.
    If anyone could help us or point through right documentation it would be of great help.

    Hi Rama,
    "The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.".”
     This is quite unhelpful because it does not give a clue of what is going wrong. You get this error because a .NET exception happens on the server side (SharePoint), and nothing catches and handles it. The solution is to check your settings.
    The problem could be with the password of the SharePoint Online Username that is set wrong in the BizTalk adapter.
    Refer:
    BizTalk integration with SharePoint 2013 Online – Troubleshooting
    Also refer:
    SharePoint 2013 and Biztalk 2013 (On-Premise)
    Alternatively, try re-registering the WCF using the below command:
    On x86 environment:
    %Windir%Microsoft.NetFrameworkv3.0Windows Communication FoundationServiceModelReg.exe -r
    On x64 you can re-register WCF using the command:
    %Windir%Microsoft.NetFramework64v3.0Windows Communication FoundationServiceModelReg.exe -r
    Refer:
    VSeWSS 1.3 Deploy fails with "Faulted state"
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • Problem overwriting documents in SharePoint Online

    I am using SharePoint Online and trying to overwrite existing documents.
    When I copy the exact filename and save the document to SharePoint Online instead of overwriting the document it is saving another version. I need to overwrite the documents.

    First, Check Out is only required if you have configured the Library settings that way.  Requiring CheckOut is not the default.  Second a file name with an apostrophe is not identical to one without.  SharePoint may be stripping the apostrophe
    since I think that is an illegal character for a filename.  Finally, there is a checkbox when uploading a file that says "Oversrite existing files" (no versioning in library) or "Add as a new version to existing files" (versioning enabled).  Are
    you sure that checkbox isn't being cleared.
    But I suspect the problem revolves around the use of the apostrophe in the file name.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Create pdf with link to image library on shared server?

    I want to create a pdf from an image library that's shared across a server by 20 mac users.
    But I want the 'contact sheet' to include clickable links from the thumbnails within it, eg:
    the user can double click and image and it will open in photoshop.
    I've tried a few things via Acrobat pro and Bridge but nothing seems to match what I want.
    Can anyone suggest anything?
    cheers.

    I want to create a pdf from an image library that's shared across a server by 20 mac users.
    But I want the 'contact sheet' to include clickable links from the thumbnails within it, eg:
    the user can double click and image and it will open in photoshop.
    I've tried a few things via Acrobat pro and Bridge but nothing seems to match what I want.
    Can anyone suggest anything?
    cheers.

  • Creating a new "Link to a Document" opens Word document or upload document dialog - plus more!

    The Link to Document content type seems to be corrupted at root. When I attempt to create a new Link, either Word opens with a blank document or the "Upload" document dialog opens. It's been changing as I investigate.
    One things I've noticed is that the "Link to a Document" Content Type on the parent site collection now shows it's parent as Document. this explains why the Word document opens, but not why the Upload dialog does.
    While writing this question, I decided to check further and it seems that the other document types, Audio, Video etc.  all now have Document as the parent and are opening a blank Word document.
    Has anyone seen this behavior? How do I fix this?
    This is on SharePoint 2010.
    Thanks in advance.
    Barry Cohen
    Barry Cohen

    Well, I spoke too soon. The process worked for all the custom content types, but the default Document type was still messed up. I probably should have fixed that one first, but...
    Anyhow, the Document type had no template going to the Upload File dialog rather than the blank Word document it's supposed to go to. I followed the same procedure I'd followed for the other content types, checking what worked on another site and using that
    template which in this case was a blank field:
    So, I went opened Document, Document Content Type and went to advanced settings. The template field was empty, which matched the working site, so thinking that if I saved, it would match up with the working site. I saved the Document content type and when
    after several minutes the save failed with an incredibly long list of locations where that were being perceived as "read only" plus several hidden content types that were listed as sealed. This snapshot shows a few of they many pages of content types. (I poorly
    struck through confidential info):
    Besides this gigantic error, which would require going to hundreds of locations on the site to change read access settings, which are, as far as I can tell actually not "read only" or are inaccessible, such as the hidden "System Page Layout' and so forth
    which shouldn't be based upon the default document type anyway and therefor not fixable, I need to understand why this is happening and what to do about it. I don't want to spend the next two days going over all of these libaries and content types and ending
    up back where I started with all the content types still screwed up. Afterall, I've spent about a day creating all these custom Content Types only to have the default Document content type loose its settings and corrupting everything and another day fixing
    it and having it happen again.
    This is a highly unacceptable behavior on the part of SharePoint and I would really like to fix this.
    Help is sorely needed.
    Thanks in advance
    Barry Cohen

  • Routing documents using SharePoint Online workflows

    Hello,
    I am trying to design a workflow for SharePoint Online, but have run into a few problems. Basically I need the workflow to work as follows:
     1. User submits a document (which is already in a Document Library in SharePoint) to a designated Supervisor for Approval
     2. Supervisor receives an email that a document is ready for approval. After reviewing:
           a. If Supervisor rejects, the document remains in the original folder
           b. If Supervisor approves, the document is automatically moved to a new folder named "Approved" within that same Document Library
    I thought there would be a template in SharePoint Online that would offer these features (i.e. the Publishing Approval workflow template I am currently trying to use), but I can't seem to enable an option to have the file automatically directed to an
    Approved folder. I have been reading online for the last hour or so and this seems to be possibly using Visual Studios, but I currently do not have that application. Are there any other options available?
    Please note - each user has their own "Approval" folder. So, if possible, I would need to apply this as a template to each user and specify the path of the Approval workflow for each user.
    I really appreciate any suggestions or advice you could provide.

    Hi,
    You can create a SharePoint Designer approval workflow to achieve this requirement. In the workflow, on approval,  add a step to copy the file to your target location. The following link demonstrates the use of Copy functionality in SharePoint Designer
    2013.
    http://cypher19.wordpress.com/workflow-copy-document-from-one-library-to-another/
    Narahari
    *******If a post answers your question, please click "Mark
    As Answer" on that post and/or "Vote
    as Helpful *********

  • How can I create a contact form for sending emails in SharePoint Online?

    Dear Forum members,
    I´ve got a question about creating a custom contact form to send emails for a public site in SharePoint online.
    Could someone help us with some advise?
    In advance, thank you very much.
    Kind regards,
    Frits

    You can create Custom list and make alerts enable to send emails as soon as contact created.
    Bala

  • How do I create a web link to a document stored in this cloud?

    I'm trying to create a link to a pdf document from another document. How can I do this?

    What program are you using?

  • Anonymous access to list on public site (Sharepoint Online)

    Hi,
    I have created a Contact Us custom list for our public web site and could assign "Add items" and "View items" permissions for the Anonymous user (by using the 3rd party WSP365
    Anonymous 2013 sandbox solution). This is clearly shown in the Permissions of this list.
    Now I'm trying to access this list through the REST API and the $.ajax function (jQuery). Assuming the list is called "ContactUs", I should be able to read and write to this list through
    http://contoso-public.sharepoint.com/_api/web/lists/GetByTitle('ContactUs')/items
    1st problem: When I try to access this list, I get a login popup asking me to log into prodnet47-48ipv4a.sharepointonline.com.akadns.net (same on IE11 and Chrome)
    Accessing directly the link above returns the following error (although I'm not sure it is meant to be accessed like that):
    <m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code>-2147024891,
    System.UnauthorizedAccessException</m:code><m:message xml:lang="en-US">Access
    denied. You do not have permission to perform this action or access this resource.</m:message></m:error>
    2nd problem: When I use _spPageContextInfo.webAbsoluteUrl +"/_api/web/lists/GetByTitle('ContactUs')/items to programatically get the base domain, the url returned is
    http://contoso-public.sharepoint.com/undefined/_api/web/lists/GetByTitle('ContactUs')/items
    Any help welcome.
    Thanks in advance

    I read that anonymous access is unsupported in 2010 and didn't find improvements in 2013. Alternative route is to create service account with minimal read permission and use this account to communicate with REST.
    http://allthatjs.com/2012/07/20/limitations-of-sharepoint-listdata-svc/
    Bala

  • Create a User account in active directory from SharePoint online 2013 list data

    Hello,
    I am trying to create a SharePoint list through which i can create a user account into active directory, 
    1 - HR is sending the detail in the email body to a Specific email address  ([email protected]) like below..
    First Name: XYZ
    Last Name: ABC
    Address: ABC 123
    Designation: Analyst
    Employee ID: 10492
    and so on 
    2 - I need to pickup every new email data of the above section into sharepoint list (in Column)
    First Name        Last Name       Address         Designation   Employee ID   
    3 - I want to create a event receiver through which i can go ahead and find the new data in the list and then create a user in the active directory,
    I tried very hard and since i dont have much experience in coding part,  any help will be highly appreciated
    Thank you 
    Aman 

    1- Configure Incoming Email Setting at your SharePoint Farm -
    https://technet.microsoft.com/en-us/library/cc262947.aspx
    http://blogs.technet.com/b/harmeetw/archive/2012/12/29/sharepoint-2013-configure-incoming-emails-with-exchange-server-2013.aspx
    2- Configure your Sharepoint List Incoming e-mail settings for [email protected] - ListSetting-Communications->Incoming e-mail settings. -
    https://support.office.com/en-in/article/Enable-and-configure-e-mail-support-for-a-list-or-library-dcaf44a0-1d9b-451a-84c7-6c52e7db908e
    3- Write an Incoming Email Receiver , and Add you Email Body Parsing Code (retrive value of fields , firstname , lastname etc) in
    EmailReceived() method. also add the code for adding new user in Active Directory
    http://blogs.msdn.com/b/tejasr/archive/2010/03/06/event-handler-code-to-add-incoming-emails-with-subject-discussion-id-as-replies.aspx
    https://pholpar.wordpress.com/2010/01/13/creating-a-simple-email-receiver-for-a-document-library/
    4-  Active Directory Code Help -
    http://www.codeproject.com/Articles/18102/Howto-Almost-Everything-In-Active-Directory-via-C
    http://www.codeproject.com/Tips/534718/Add-User-to-Active-Directory
    Thanks
    Ganesh Jat [My Blog |
    LinkedIn | Twitter ]
    Please click 'Mark As Answer' if a post solves your problem or 'Vote As Helpful' if it was useful.

Maybe you are looking for

  • Missing library error while deploying the ADFBC application

    Hi, I have small application developped using ADFBC. The application is working perfectly fine when I run the app using JDev. When I try to deploy the app to the standalone oc4j, I am getting following error... Binding SRDemoApp web-module for applic

  • Installing after automatic repair of the computer

    Dear all, I bought Adobe Design Std 6 version during my stay in Japan (in March 2014) and all documentation is in Japanese language (of course I can follow the numbers and all other numerical information on my licence). Everything worked well. But my

  • Broken Link to 3rd Gen iPod Manual

    just FYI. http://manuals.info.apple.com/en_US/iPodDockConnectorUserGuide.PDF

  • Financial Reporting 9.1.3 - Modifying Email Body text of cmd line scheduled

    I would like to add text to the body of the command line scheduled email that is sent out using Financial Reporting. Ideally I would like to suppress the text that is automatically added to the body of the email by Financial Reporting as well. I have

  • Passing parameters at runtime

    Hi all, I have a Db2 stored procedure in the data model, which is the record source. I have a master child design and i need to pass the values that is retrieved in the master frame as parameters to the DB2 stored procedure in the child frame. The va