Hi :),
I use the Invite function to invite an external user to my sharepoint:
POST /me/drive/items/{item-id}/invite
Content-type: application/json
{
"recipients": [
{
"email": "user@externaldomain.com"
}
],
"message": "Here's the file that we're collaborating on.",
"requireSignIn": true,
"sendInvitation": false,
"roles": [ "read" ]
}
I am having problems. Indeed, I do not have the same answer all the time :
Example 1 :
<?xml version="1.0" encoding="UTF-8"?>
<root odata.context="https://graph.microsoft.com/v1.0/$metadata#Collection(permission)">
<value odata.type="#microsoft.graph.permission">
<id>aTowIy5mfG1lbWJlcnNoaXB8dGlDH872kjhfXJlLmVlI2V4dCNAc29sbzEuyeud73UYyb3NvZnQuY29t</id>
<roles>read</roles>
<grantedTo>
<user>
<email>test@XXXXX.ee</email>
<id>4a79tyj8-a156-ty76-afe6-018a2529eg8f</id>
<displayName>Test JDA</displayName>
</user>
</grantedTo>
</value>
</root>
And some time i have this, example 2 :
<?xml version="1.0" encoding="UTF-8"?>
<root odata.context="https://graph.microsoft.com/v1.0/$metadata#Collection(permission)">
<value odata.type="#microsoft.graph.permission">
<roles>read</roles>
<grantedToIdentities>
<user>
<email>XXXXX@gmail.com</email>
</user>
</grantedToIdentities>
<invitation>
<signInRequired>true</signInRequired>
</invitation>
<link>
<type>view</type>
<webUrl>https://TEST.sharepoint.com/:f:/s/TEST/LSDHKJSGKJFGL8798687_7896DSFHJ</webUrl>
</link>
</value>
</root>
The second one it's perfect for me beaucause I have the WebURL.
I think in the first example it's the answer you get when you invite an Azure user. How can I fix this problem to always have the answer of the second example with the WebURL?