Fix OneDrive Anonymous File Sharing Share ID Failure via REST API
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.
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).
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.
Go to the official Microsoft Q&A platform (learn.microsoft.com/en-us/answers/) to seek developer support.
When creating your post, tag the question heavily with 'Microsoft Graph' and 'OneDrive API' to ensure it routes to the correct Microsoft engineering specialists.
Include your .NET MAUI environment details, the specific createLink endpoint you are calling, and the exact JSON payload used to generate the anonymous link.
Check Microsoft 365 Tenant Sharing Policies
Ensure that your organization's sharing policies haven't been globally restricted, which would automatically override any API requests for anonymous links.
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. Download WPS Office: Visit the official WPS website to download the free, lightweight suite.
- 2. Install and Open: Run the installer and open the application to access familiar document tools.
- 3. Share Files Easily: Use the built-in 'Share' button within any document to securely generate view or edit links instantly.

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.




