logo
search
File Sharing Problems

Fix OneDrive Anonymous File Sharing Share ID Failure via REST API

Maira MehtabMaira Mehtab Sep 22, 2026 869 views

Question details

A developer needs to resolve an issue where anonymous file-sharing links generated via the OneDrive REST API return a share ID that only works for the originating account.

Product
OneDrive REST API / Microsoft Graph
Device & OS
not provided
Scenario
Creating anonymous file-sharing links dynamically within a .NET MAUI application.
Observed behavior
The returned share ID fails to grant access to anonymous users and only functions for the specific account that created the share link.
Before you start

Verify that your Microsoft 365 tenant settings explicitly allow anonymous file sharing and that your Azure AD application is granted the correct Microsoft Graph API permissions (such as Files.ReadWrite.All).

Solution 1Recommended

Seek Specialized Microsoft Graph Support on Microsoft Q&A

Since the API behavior has changed unexpectedly on Microsoft's end, consulting Microsoft Graph specialists is the most direct path to resolving core share ID permission errors.

This issue is often tied to backend changes or token validation problems within the Microsoft Graph API ecosystem, which require specialized investigation by Microsoft.

1
Navigate to Microsoft Q&A

Go to the official Microsoft Q&A platform (learn.microsoft.com/en-us/answers/) to seek developer support.

2
Select the Microsoft Graph Section

When creating your post, tag the question heavily with 'Microsoft Graph' and 'OneDrive API' to ensure it routes to the correct Microsoft engineering specialists.

3
Provide API and Application Details

Include your .NET MAUI environment details, the specific createLink endpoint you are calling, and the exact JSON payload used to generate the anonymous link.

Track Existing Threads: You can follow existing developer threads regarding this issue, such as 'The shareId obtained from createLink can no longer be used by anonymous users' directly on Microsoft Learn.
Free Microsoft Office alternative

Try WPS Office for Seamless File Management and Sharing

While troubleshooting complex Microsoft Graph API issues for document sharing, consider using WPS Office as your primary productivity suite. WPS Office offers robust built-in cloud integration and seamless file sharing capabilities that do not require complex API configurations.

  1. 1. Download WPS Office: Visit the official WPS website to download the free, lightweight suite.
  2. 2. Install and Open: Run the installer and open the application to access familiar document tools.
  3. 3. Share Files Easily: Use the built-in 'Share' button within any document to securely generate view or edit links instantly.
Free, lightweight, and installs in seconds.Fully compatible with Microsoft Office formats (Word, Excel, PowerPoint).Built-in cloud storage with one-click link sharing functionality.Familiar user interface requiring no learning curve for easy migration.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my OneDrive API createLink return a share ID that only I can use?

This usually occurs when the Microsoft 365 tenant's external sharing policy is restricted, or when there is an ongoing anomaly with the Microsoft Graph API preventing the anonymous permission token from correctly propagating to the file.

How do I correctly request an anonymous sharing link via the OneDrive REST API?

You must call the createLink endpoint on the DriveItem and pass a JSON body specifying the type as 'view' or 'edit' and the scope as 'anonymous'. Additionally, your Azure app must be granted the Files.ReadWrite.All permission.

Can I use WPS Office to share files without writing API code?

Yes. WPS Office integrates seamlessly with WPS Cloud, allowing you to create, manage, and share documents via simple URLs directly from the desktop or mobile application interface without needing to configure complex APIs.