Hello Community!
I have been working on an issue with a Power Automate workflow to automate granting access to users. I have received a lot of help from the community on this one and I hope this will be the last issue.
I have 3 actions:
- Send an HTTP request to get User Principal ID
- Initialize varUserPID variable
- Send an HTTP request to Grant User Access
Here is the screen shot below:
The workflow builds without error, but when I run it I get this error:
The expression "lists/getByTitle('IDEA B Basic & Preschool Budgets Objective2')/items(6)/roleassignments/addroleassignment(principalid=body('Send_an_HTTP_request_to_SharePoint_to_get_User_Principal_ID')['d']['id'],roledefid=1073741830)" is not valid.
clientRequestId: 068ac05d-b3fe-4577-bee6-bb8885dbf484
serviceRequestId: 1d1fc8a0-c043-3000-fb2e-09c786b3c415
Here is the Raw Output:
{
"host": {
"connectionReferenceName": "shared_sharepointonline",
"operationId": "HttpRequest"
},
"parameters": {
"dataset": "https://nmgov.sharepoint.com/sites/IDEABGrant",
"parameters/method": "POST",
"parameters/uri": "_api/lists/getByTitle('IDEA B Basic & Preschool Budgets Objective2')/items(6)/roleassignments/addroleassignment(principalid=body('Send_an_HTTP_request_to_SharePoint_to_get_User_Principal_ID')['d']['id'],roledefid=1073741830)"
}
}
According to the article below everything is configured correctly.
https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Power-Automate-and-SharePoint-Permissions/ba-p/656216
Has anyone else seen and corrected this issue and if so please provide code examples and guidance.
Thanks!
Tom