I want to send an invitation by mail to customers, so they can download a file from our SharePoint. The request is like this:
https://graph.microsoft.com/v1.0/sites/{{siteId}}/drives/{{driveId}}/root:/Prueba/prueba.txt:/microsoft.graph.invite
With body:
{
"recipients": [
{"email": "[email protected]"},
{"email": "[email protected]"}
],
"message": "Download your file",
"requireSignIn": true,
"sendInvitation": true,
"roles": [ "read" ]
}
If I fill up "recipients" with mails from the organization, everything goes ok.
But when I use external mails (gmail, hotmail, other companies mails, etc), the response is 400 with this body:
{
"error": {
"code": "invalidRequest",
"message": "The request is malformed or incorrect.",
}
}
}
I suppose we need to configure our SharePoint in a certain way, but Microsoft support couldn't help us. Could anyone suggest any solution?
Thanks!
You can use the other mail Accounts like gmail,yahoo etc in the recipients property but before that you need to modify your site setting. Go to Sharepoint Admin Center--> Sites --> Active Sites --> Select the site which you are using and click on the 3 dots just below "Active sites" heading and select sharing and make it anyone.