Hi All,
I have created a ms flow which uses SharePoint Rest api to add particular user to a sharepoint group.
Some time this flow runs successfully but it does not add user to sharepoint group. This is happening intermittently and neither MS flow throwing any error.
Has anyone face this issue?
SharePoint API:
_api/web/sitegroups(123)/users
Solved! Go to Solution.
Hi @nitishbi,
How do you configure the Send HTTP request?
I try to add a user into my Group, but not find the same issue:
According to the output, it seems like the user has been added in the group, you could use the following HTTP request to check the Group members:
_api/Web/SiteGroups/GetById(5)/Users
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @nitishbi
Check your run history and see the results?
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogFlow does not show any error for the step which calls the sharepoint rest api and shows success check mark (✔️) 😞🙄
Hi @nitishbi
Thanks for your quick reply. Add a compose action after the http and output the body from the http. Then check the run results.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogHere is the output:
{
"d": {
"__metadata": {
"id": "https://mysharepintsite.sharepoint.com/sites/QA/_api/Web/GetUserById(89)",
"uri": "https://mysharepintsite.sharepoint.com/sites/QA/_api/Web/GetUserById(89)",
"type": "SP.User"
},
"Alerts": {
"__deferred": {
"uri": "https://mysharepintsite.sharepoint.com/sites/QA/_api/Web/GetUserById(89)/Alerts"
}
},
"Groups": {
"__deferred": {
"uri": "https://mysharepintsite.sharepoint.com/sites/QA/_api/Web/GetUserById(89)/Groups"
}
},
"Id": 89,
"IsHiddenInUI": false,
"LoginName": "i:0#.f|membership|nitish@test.com
"Title": "Nitish",
"PrincipalType": 1,
"Email": "nitish@test.com",
"Expiration": "",
"IsEmailAuthenticationGuestUser": false,
"IsShareByEmailGuestUser": false,
"IsSiteAdmin": true,
"UserId": {
"__metadata": {
"type": "SP.UserIdInfo"
},
"NameId": "XXXXX",
"NameIdIssuer": "urn:federation:microsoftonline"
},
"UserPrincipalName": "nitish@test.com"
}
}
Hi @nitishbi,
How do you configure the Send HTTP request?
I try to add a user into my Group, but not find the same issue:
According to the output, it seems like the user has been added in the group, you could use the following HTTP request to check the Group members:
_api/Web/SiteGroups/GetById(5)/Users
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-litu-msft ,
Thanks for the response.
I am using same api and it works most of the time, but few time it does not add user to group and shows no error or failure.
This is happening intermittently.