OneDrive / onedrive-api-docs

Official documentation for the OneDrive API
MIT License
447 stars 228 forks source link

General exception when inviting users to access a file in a SharePoint Site #1779

Open MarioVitale opened 5 months ago

MarioVitale commented 5 months ago

I have a problems using the MS Graph API Add Permissions on a SharePoint site.

Category

Observed Behavior

My application uses an app registration with the Sites.ReadWrite.All permissions allowing to upload and share a file using the Graph API. The SharePoint configuration is as follows:

image

I encountered 2 issues while developing. The first is that when the "Allow only users in specific security groups to share externally" flag is enabled, the app registration can no longer share files, even if it is present within one of the allowed groups. Removing the flag restores the sharing functionality.

image

The second problem is related to sharing itself. Currently, sharing only works with Microsoft Work Accounts. If a "non-Microsoft" account is used, I receive a 500 error with code "generalException" and message "An unspecified error has occurred.".

Expected or Desired Behavior The invite API should succeed with a 200 with any account type.

Related

1614

What can I check? Are there any configurations in the tenant or in the API that I can verify? Thank you