How can I delete SharePoint site groups using Power Automate?
-
08-02-2021 - |
Вопрос
I am trying to use Power Automate to delete a bunch of SharePoint site groups but it does not seem to be working. My flow is successful but the group(s) are not removed. Google results seem to be more related to removing users from groups, not removing the groups themselves.
Can anyone explain what I've done wrong with my flow action?
My knowledge of REST is very limited at this stage.
My Site group:
My Flow action:
The Flow output:
Другие советы
You can ignore the flow output in this case, all you have to do is to remove the Headers part from your Flow action, everything else looks OK. All you need is the POST method to the _api/web/sitegroups/removebyid([id])
Note the headers accepts JSON string, but you're providing it as a JS object. Removing it altogether will make it work.
As long as you're getting Status code 200, it means your flow ran successfully and it actually deleted your group.