I am trying to add and remove users to a SharePoint site using the "Send an HTTP request to SharePoint" action. The add action works but the removal does not.
Any ideas where I am going wrong?
Error message: The expression "web/SiteGroups(https:/normyoung.sharepoint.com/sites/SharePointDemo/_api/Web/SiteGroups/GetById(5))/users/removeByLoginName" is not valid.
Solved! Go to Solution.
Try adding the user login into the request string as such.
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.
Hi @ChrisPiasecki, thank you for the suggestion, I appreciate it. I was not able to get "removeByLoginName" to work and went with "removeById".
It's working now and I will post the solution to help others.
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.