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

Mario Vitale 0 Reputation points
2024-03-12T11:19:01.1433333+00:00

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

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:

sharepoint config

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.

first error

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.".

I opened the same issue on OneDrive api docs. What can I check? Are there any configurations in the tenant or in the API that I can verify? Thank you

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,447 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,518 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 30,586 Reputation points Microsoft Vendor
    2024-03-13T06:39:16.8066667+00:00

    Hi @Mario Vitale,

    This behaviot should be the issue in the sharepoint backend, you could raise a feedback. it is highly recommended that you can vote this ticket. Many features of our current products are designed and upgraded based on customers’ feedback. With requirements like this increase, the problem may well be released in the future. Thanks for your understanding.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.