Tuesday, July 19, 2022

Get User from SharePoint Group using Power Automate

Introduction:


In this blog we will see how to get User from SharePoint Group.


Implementation Steps:

 

Create SharePoint Group:

 

1. Navigate to your SharePoint Website

 

2. Click Settings icon at the Top Right 

 

3. Then Select Site Permission

 

rampprakash_0-1658150063051.png

 

4. Then select Advanced Permission Settings

 

rampprakash_1-1658150127776.png

 

5. Click Create New Group

rampprakash_2-1658150162713.png

 

6. Provide Name for SharePoint Group and Choose the Control

 

rampprakash_3-1658150233322.png

 

 

7. Once Done Open the Group and Copy the MemberShipGroupID

 

rampprakash_4-1658150350337.png

 

 

in my case the ID is 10

 

Power Automate:

 

1. Now Navigate to https://flow.microsoft.com

 

2. Click My Flows --> Select New Flows --> For Now am selecting Instant Cloud Flows

 

rampprakash_0-1658226666373.png

 

3. Enter the Flow Name and Select PowerApps

 

rampprakash_1-1658226728281.png

 

 

4. Once page is Loaded then Select New Steps and Search for http (then select Send an HTTP request to SharePoint)

 

rampprakash_2-1658226838010.png

 

 

5. Once Selected Provide the URL and Method as GET and URI

 

rampprakash_3-1658227193746.png

 

URI : /_api/web/sitegroups/getbyid(SHAREPOINTGROUPID)/users

 

6. Save it and Test the Flow

 

7. Once Saved then Click Test and Run the Flow

 

8. Once Flow ran Success you can able to see the Output values

 

rampprakash_4-1658227343817.png

 

 

9. Now Copy the Output body and Provide in PARSE JSON

 

10. Now Add Parse JSON 

 

rampprakash_5-1658227631653.png

 

 

11. Input the Details

 

rampprakash_6-1658227675997.png

 

 

12. Then Click Generate from Sample then Paste the OUTPUT Copied from HTTP REQUEST

 

13. Now Initialize Variable as get User Principal Name

 

14. Then Set Variable and Select User Principal Name in the Set Variable

 

Note:

 

While Parsing if you face an Error try changing User Principal Values to String and null as well

 

rampprakash_7-1658228014422.png

 

 

No comments:

Post a Comment

Day 11 - Customizing Option Sets Dropdown Fields with JavaScript

  In this Blog, we will see how to Customizing Option Sets Dropdown Fields with JavaScript label1 = formContext.getAttribute( "bosch_op...