web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Grant site access to a...
Power Automate
Suggested Answer

Grant site access to a newly created SharePoint group

(1) ShareShare
ReportReport
Posted on by 3
When manually creating a new SharePoint group, you get the option to grant sitewide access to the group at a chosen permission level.  When creating a new group via Power Automate, I don't see a way to do it.  So my question - is there a parameter in the Send an HTTP Request to SharePoint action that will allow me to grant that permission, or is there a way to grant the permission after creating the group?  I know how to add the group to a specific library, but not to the site as a whole.
 
The HTTP Request I use to create the group goes a little something like this:
 
POST
 
Header:
{
  "accept": "application/json;odata=verbose",
  "content-type": "application/json;odata=verbose"
}
 
Body:
 
{
    "__metadata": {
        "type": "SP.Group"
    },
    "Title": "@{outputs('SPGroupName')}",
    "Description": "The bestest group ever"
}
 
 
I don't see a site permissions parameter I can address in the documentation:
 
 
So if I can't address that when creating a group, can I grant the group Read permission at the site level after I create it?
 
Thanks in advance!
Categories:
01 group permissi...
02 Group permisis...

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

I have the same question (0)
  • Suggested answer
    SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at
    You can assign site-level permissions in two steps:
    Step 1: Get form digest
    To get the X-RequestDigest value, make a GET request to the contextinfo endpoint.

    Method: POST
    URI: https://<your-sharepoint-site>/_api/contextinfo
    Headers:
    {
      "accept": "application/json;odata=verbose"
    }

    Use the Parse JSON action to extract the FormDigestValue from the response.
     
     
    Step 2: Add the group to the site
    Method: POST
    URI: https://<your-sharepoint-site>/_api/web/roleassignments/addroleassignment(principalid=<GroupID>,roledefid=<RoleDefinitionID>)
    Headers:
    {
      "accept": "application/json;odata=verbose",
      "content-type": "application/json;odata=verbose",
      "X-RequestDigest": "<Your-Request-Digest>"
    }
    Body is not required

    Replace <GroupID> with the ID of the group you retrieved in Step 2.
    Replace <RoleDefinitionID> with the appropriate permission level ID:
    Read: 1073741826
    Contribute: 1073741827
    Full Control: 1073741829
    Replace <Your-Request-Digest> with the FormDigestValue from the contextinfo endpoint
     
    Hope that helps!
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard