Introduction
Solution
Replace the highlighted content in the object below:
{
"url": "https://tenantname.sharepoint.com/sites/sitename",
"peoplePickerInput": "[{\"Key\":\"Email Address\",\"DisplayText\":\"Email Address\",\"IsResolved\":true,\"Description\":\"Email Address\",\"EntityType\":\"\",\"EntityData\":{\"SPUserID\":\"Email Address\",\"Email\":\"Email Address\",\"IsBlocked\":\"False\",\"PrincipalType\":\"UNVALIDATED_EMAIL_ADDRESS\",\"AccountName\":\"Email Address\",\"SIPAddress\":\"Email Address\",\"IsBlockedOnODB\":\"False\"},\"MultipleMatches\":[],\"ProviderName\":\"\",\"ProviderDisplayName\":\"\"}]",
"roleValue": "group:GroupID",
"sendEmail": true,
"emailBody": "",
"includeAnonymousLinkInEmail": false,
"useSimplifiedRoles": true
}
Set the Email Address of the external user that you want to add to the SharePoint Group. Set the GroupID of the SharePoint Group to which you want to add the user.
Site Address: https://tenantname.sharepoint.com/sites/sitename
Method: Post
Uri: _api/SP.Web.ShareObject
Headers:
{
"accept": "application/json;odata=verbose",
"content-type": "application/json;odata=verbose"
}
Body: Output of Compose Action
The flow can now be tested. Once the flow instance has succeeded the invite is sent to the external user. After the external user accepts the invite, the user should be automatically redirected to the SharePoint site with the appropriate access.