Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Solution
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

How to assign custom SharePoint permission level with Power Automate

Posted on June 19, 2022June 19, 2022 by Tom

“I created my own permission level in SharePoint ‘Contribute without Delete’, how can I assign these custom permissions to users in a Power Automate flow?”


The most direct Power Automate action to assign SharePoint permissions is the ‘Grant access to an item or a folder’. You select the site, list/library, item/file, user, and the permission level, and flow will do the rest. But the roles in this action are very limited. You can add only two permission levels: ‘Can edit’ giving user the ‘Contribute’ permission level, or ‘Can view’ to assign ‘Read’ permissions.

Power Automate custom SharePoint permission

But what about the other permission levels? Let it be the default ones, e.g. Full Control, or custom ones, e.g. Contribute without Delete? What custom value does the action expect in the Roles field?

You’ll need the permission level id

If you select one of the available roles and use the ‘Peek code’ functionality, you’ll see what’s happens behind the choice field. The action replaces the ‘Can edit’ or ‘Can view’ with a string in format:

role:<permission level id>

That’s what the action expects as a custom value. Therefore, if you want to add different permissions than ‘Contribute’ or ‘Read’, you can add them using the same string.

Get the permission level with an HTTP request

The permission level id is accessible only via an HTTP request to SharePoint. Add the ‘Send an HTTP request to SharePoint’ action with the configuration below.

Method: GET

Uri:
_api/web/roledefinitions/GetByName('<permission level name>')

Note: <…> is a placeholder, replace it including the < and >.

The request will check all permission levels on the site, and return only the one with the specified name. In this example it’s the ‘Contribute wo Delete’ permission level.

Extract the permission level id from the outputs JSON and use it to grant the permissions.

body('Send_an_HTTP_request_to_SharePoint')?['d']?['Id']
Power Automate custom SharePoint permission

Summary

The new Power Automate actions expect that you’ll work only with two permission levels in SharePoint – ‘Read’ or ‘Contribute’, ignoring the the other default levels as well as the custom ones. But if you know the permission level id you can use it, let it be using the ‘Grant access…’ action or with an HTTP request.


πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

4 thoughts on “How to assign custom SharePoint permission level with Power Automate”

  1. Naresh says:
    September 15, 2022 at 4:18 pm

    Hi, would it be possible to delete the user permissions if the permission level matches? In the above case once i know the role ‘contribute wo delete’ , i would like to remove all those users from that level

    Reply
    1. Tom says:
      September 18, 2022 at 7:21 pm

      Hello Naresh,
      I don’t know, I never needed to remove only users with specific permission level so I have no idea if there’s an HTTP request that would list only those users.

      Reply
  2. Pratik Ponkiya says:
    October 4, 2022 at 5:35 am

    Hi Tom,
    The same action granting access to an item or folder works for other options than reading and editing. Please read this article from Microsoft. https://learn.microsoft.com/en-us/sharepoint/dev/business-apps/power-automate/guidance/manage-list-item-file-permissions
    I really like your work and learned a lot, so I am sharing this with you.
    Thank you,
    Pratik

    Reply
  3. Tom Benjamin says:
    November 14, 2024 at 10:13 pm

    Hi Tom, you provide an awesome set of resources through your articles. If I see “Tom Riha” in search results when I’ve got a Power Automate problem, I follow that link first.
    Do you know of a way to edit a specific permission level in a site? For example I want to remove “Manage Lists” from the “Edit” permission level in a Teams-connected SharePoint site that I am creating in Power Automate.
    Thanks,
    Tom

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Get the Approval Process solution and the Task Delegation App to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes