question

ChristopherWilson-1288 avatar image
0 Votes"
ChristopherWilson-1288 asked saldana-msft edited

Permissions required for /invite endpoint vs /createLink in Sharepoint via Graph API

I can create a sharing link via the POST /sites/{siteId}/drive/items/{itemId}/createLink endpoint, which works correctly. This allows editing by all members of our organization with the link however, whereas I would like only for specific users to be able to do so.

When I attempt to use the POST /sites/{siteId}/drive/items/{itemId}/invite endpoint, which appears to accomplish what I am after, I receive a 403 response with the following message:

{'code': 'notAllowed', 'message': 'The feature has been disabled. Please contact your admin to get it enabled.'}

Is anyone able to point me to the correct configuration that will enable me to use this endpoint? I am able to perform this action in the UI, so do not believe it to be an issue with settings on the site itself. I am also confused as to why I am able to share with the entire organization, but not specific members!

Kind regards,

Christopher Wilson


office-sharepoint-onlinesharepoint-devmicrosoft-graph-sdk
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MichaelHan-MSFT avatar image
1 Vote"
MichaelHan-MSFT answered ChristopherWilson-1288 commented

Hi @ChristopherWilson-1288,

Try to set requireSignIn parameter to true in the body as the below, check if it works for you.

 {
     "requireSignIn": true,
     "sendInvitation": true,
     "roles": [
         "write"
     ],
     "recipients": [
         {
             "email": "michael@contoso.onmicrosoft.com"
         }
     ],
     "message": "test message"
 }


If an Answer is helpful, please click "Accept Answer" and upvote it.
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.



· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Dear Michael,

Thank you very much! Embrassingly, I had 'require*s*SignIn' set instead... That is now working, thank you again!

0 Votes 0 ·