
Open a new ClientContext using this web URL to make additional requests. Open a ClientContext on the root site (scheme://hostname).Ĭall Web.WebUrlFromPageUrlDirect() to get the web URL of the link. This approach no longer works with the new URL format. Some applications open a ClientContext and query the file metadata by successively truncating path segments from the SharePoint link until the ClientContext constructor succeeds. You will need to use the Send button to achieve this. Firstly, the form can be shared directly with the folks whose responses you want to record. SharePoint CSOMĬSOM does not have a supported way to interact with user input links. You can share Google Forms in three ways. Use this method instead of parsing URLs for tokens such as guestaccess.aspx. The simplest way to do this is as follows: 1. This is the original API is the new API determine the specific type of link, inspect the IsSharingLink and IsAnonymous fields in the response for the GetSharingLinkData API (replace GetFileByUrl with GetSharingLinkData in the examples). When you upload a folder to your Google Drive, its format will remain the same. This is now the hostname of the link.Ĭonstruct the API request by concatenating the base URL, SP.RemoteWeb, and a specific API method, as example, for the following input URL:

Note that this workaround is not supported.ĭetermine the base URL. If you’re unable to migrate to Microsoft Graph, you can use the following workaround.

We recommend that you migrate to the Microsoft Graph shares API if possible. The SharePoint REST API does not have a supported way to interact with user input links. For more information, see Accessing shared DriveItems. The following are some scenarios that are affected by this change:Īpplications that parse a URL input by an end user to get the site URL in order to construct SharePoint REST API requests such as GetFileByUrl or GetSharingLinkData.Īpplications that take URL input from an end user and use CSOM to attempt to query file information.Īpplications that parse a URL input by an end user to determine whether it is an anonymous or an internal-only sharing link.Īpps that use Microsoft Graph to interact with SharePoint links will continue to work. The new short links are compatible with all APIs that work with guestaccess.aspx links.

The new link format might affect applications or services that inspect or take dependencies on OneDrive or SharePoint URL structures, especially if those applications or services parse the site URL or specific strings. Links that were shared before this change was introduced are not affected by the change and will continue to work.
