I am able to add a new SP Group but what I need is to check to see if a group is already created before I create a new group.
The HTTP Request and JSON will error if a Group is already created.
Can I create a condition that checks if the group is already created?
You can check if the results property is empty in the response. You can use this expression for that:
In the Yes branch you can add the creation of your new group. If it is false it means it has found your group.
Hello and thank you once again for your assistance.
I input the expression and renamed it to reference the name of my HTTP request action.
I received the below error.
I am sure I must be missing something
There might be a small typo in the expression.
It is worth checking with a compose action right after the Send an HTTP request to Get SharePoint Groups 2 action.
When you use the expression editor and add the body field you can check if the name of the action is correct.
Can you please remove the Accept application/json header entry from that request as well? I think your response will be different when you use that header. That is probably the reason why it is not receiving the 'd' property in your response.
I created a new User Group and received no issues after that change.
Going to try again using the same User Group to see if that works as expected.
I need to understand this api a lot more.
Very useful information.
Thank you very much for your assistance with this.
I will keep you posted if any issues running the duplicate group.
Hello, I know the group is created at the top level but my list doesnt have any groups.
I need to add the Owners, Members and Visitors groups and then assign the users that are captured in my list item the appropriate permission.
Can I use the HTTP request to do this?
I was able to create a group and add users to the group.
The issue now is granting permissions to the new group I created and assign unique permissions.
When I attempt to grant permissions I get an error.
Can you tell me what I am missing?
I think there is a small typo in your Uri. It should be principalid and roledefid:
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
The Super User program for 2022- Season 2 has kicked off!