Hi there,
I’m trying to add access to a user group using Flow.
I’m building a minutes repository and I’ve created a PowerApp which the different disciplines in our college can add the minutes to it using.
On the repository SharePoint I have created a user group for each discipline and I want Flow to give the correct group access. From my reading, you use a send HTTP request to Sharepoint to get the group and as it identifies using a string I’m getting PowerApps to look up the group name.
Then you initialize the variable using this function: body(‘Send_an_HTTP_request_to_-SharePoint’)[‘d’][‘id’]
Then you use a second Send an HTTP request to SharePoint but my flow is failing to add the user group.
I think it might be because my URI expression is for lists and I want to add permission to a file in a library.
Any help would be greatly appreciated
Solved! Go to Solution.
Hi @PipManifold :
If you want to assigning permission for folder ,maybe you could try:
https://{site Url}/_api/web/GetFolderByServerRelativeUrl(‘Lists/{DocLibName }/{folder url}’)/ListItemAllFields/roleassignments/addroleassignment(principalid={User or group id},roleDefId={Role definition id})
I think this link may help you a lot:
SharePoint REST API URL for accessing List items,documents,assign permission in list, document libra...
Best Regards,
Bof
Hi @PipManifold :
If you want to assigning permission for folder ,maybe you could try:
https://{site Url}/_api/web/GetFolderByServerRelativeUrl(‘Lists/{DocLibName }/{folder url}’)/ListItemAllFields/roleassignments/addroleassignment(principalid={User or group id},roleDefId={Role definition id})
I think this link may help you a lot:
SharePoint REST API URL for accessing List items,documents,assign permission in list, document libra...
Best Regards,
Bof
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
31 | |
27 | |
27 | |
21 | |
10 |