Welcome back in the User Permissions series. In last post (Part 1) we have created a list, SharePoint Groups, added users to these groups, broke inheritance of list permissions, assigned unique permissions. You may use below link to visit the post-
In this Part, we will create an Instant cloud flow (of type PowerApps) and then we will initialize some variables in that flow.
So, let's start-
- Click on App Launcher icon provided at top left corner and click on Power Automate.
- It will open the Power Automate maker portal. Click on "+ Create" and then choose "Instant cloud flow".
- It will open a popup, where you need to input the flow name.
- Then choose flow type as PowerApps, then click on Create button to create the flow.
- Now click on Save to initially save the flow. Once saved this way, will not let you down in case of any accidental crash. Now, further you need to just click on Save to save the flow any time.
- Now, we need to input variables-
- User EMail ID
- List Name
- These values will be provided from PowerApps and we will process here in flow. So, add a Compose action and rename it "Compose ListName". For Input value, we will select "Ask in PowerApps" as shown in below screenshot-
- Similarly, add another compose action to get UserEMail as input-
- Click on Save icon to save our changes. We will save the flow frequently.
- Now we will initialize a string variable "strUserPermissions" using "Initialize variable" action. This variable will store a concatenated string of all Permissions, Permission Groups assigned to user upon the list name provided.
- Now we will initialize an integer variable "intPrincipalId" using "Initialize variable" action. It will be used to capture the PrincipalId of the group (basically it is the MembershipGroupId which we see in URL when we click on any SharePoint group). Initialize it with ZERO initially.
- Now we will initialize another string variable "strSharePointGroupName" using "Initialize variable" action. It will be used to capture the SharePoint Group name. We will get this information from Member Title.
- This completes the Part 2. In Part 3, we will send HTTP request to get RoleAssignments (list permissions) applied upon the list and then we will parse it to get it readable.
With this, I am concluding this post.
Happy Coding !!!
Will see you again with some new topics.
Stay Safe !
Stay Healthy !
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.