Hi @testuser ,
As per my testing we can edit the role/permission that are granted to the recipients of the sharing invitation using this permission-update API with global admin account/tenant admin account who has been shared the invite.
If you are trying to edit role/permission from that particular user who has been invited then that user must have role owner. With read/write role we will get access denied error.
To give owner role to another user use the below query:
Post https://graph.microsoft.com/v1.0/drives/b!LyWi4x3ZA0ymcGgud7voumd2ty54z5VCgTAzO3fUgHq2GVB6zkWDQKBGPVxEOtg8/items/01KGX6IABKL7ARJX4GQZGLXF4XMQBJQICS/invite
{
"requireSignIn": true,
"sendInvitation": true,
"roles": [
"sp.full control"
],
"recipients": [
{
"email": "******@gggg.onmicrosoft.com"
}
],
"message": "hi"
}
Please find below screenshot for your reference:
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.
