Power Automate get SharePoint Group Members & flow code snippets
HTML-код
- Опубликовано: 22 май 2024
- In this video on Power Automate get SharePoint Group Members & flow code snippets, we will go through a step-by-step tutorial of how to get users/members from a SharePoint group. We will also look at how to share flow code snippets with users within or outside your organization. Code snippets basically mean sharing parts of your flow with other users. Flow snippets uses the flow copy to my clipboard action.
Video covers the following:
✅ Get Members from SharePoint Group
✅ Flow Code Snippets - copy to my clipboard action
✅ Get Members of Office 365 Group or Azure AD Group
✅ Sample Snippets to download
Links:
github.com/rdorrani/Microsoft...
Sharing flows - • Sharing a Flow in Powe...
Table of Contents:
00:00 - Intro
01:38 - Send email to SharePoint group members from Power Automate flow
09:22 - Share flow snippets - Use copy to my clipboard action across users and tenants.
16:55 - Subscribe to Reza Dorrani channel
Thank you for sharing all this knowledge, your channel is worth its weight in gold. I could have a text repository of all common actions used and just like that be in business in another flow. Wow 🤗
Thats the idea behind this. Build your own code snippets and share it with others.
@@RezaDorrani Sir how can I access SharePoint groups in PowerApps or please elaborate or make a different video on this
@@amansharma751 my most recent video shows how to check if user is member of a SharePoint Group. To get all SharePoint group members, I will have to explore and see if there is a trick way :) If I get a neat trick then I may do a video on it.
Reza, this is awesome. Thanks for the snippets - will save me a lot of time! I plan to go through all of your automate series.
Glad you like them! Enjoy the automate series.
Wow! That pasting to the clipboard. It's so impressive! Thanks a lot for sharing.
Thank You
Excellent video Reza - all very relevant to what I am currently looking at. Loving the sharing tip - will be a big help in my org. Cheers!
Thank You
WOW, that is such a cool tip, copy and pasting actions as text, I feel a library of actions coming up! I wish variables could be added to a scope that would really take the possibilities to the next level but this is still such a useful feature. Yet another Reza video where I learn something that will make my life easier!
Thank you Dan. It surely is super powerful. Let me know what library of actions you feel are helpful. I have provided 3 to start with as part of this video.
Thank you. This is an amazing tip and something I had been struggling with for a long time. It did not occur to me that you could use the SharePoint HTTP request to access a list of users in a SharePoint permission list. And amazingly there are 'two for the price of one' pieces of advice as it is really helpful to be able to copy an paste scoped actions. This is, as always, a very clear and extremely helpful video.
Awesome! Thanks so much for watching.
Perfect timing. Exactly the alternative I needed for that annoying Parse JSON . Thx RZA
Thanks Emil
Hi. I can say your videos are really sensational. I'm now exploring Power Automate and MS automation process, and your materials are really helpful. Thank you!
Great to hear!
Always sharing awesome tips and tricks!👏👏👏
Thank You
Thank you Reza for sharing all your knowledge!!!
My pleasure!
Absolutely Excellent and time-saving tutorial!
Glad it was helpful!
Very useful tips. Thank you for sharing.
Most welcome
Great stuff as always, Reza!
Joey my friend. This is your work I am showcasing. You are the best.
Outstanding, thank you for another awesome video!
Thanks again!
This is so powerful! Thank you for sharing :)
Thank you for watching.
Thank you! This video was really helpful to me.
Glad it was helpful!
You are fantastic! Thank you!
You are so welcome!
Excellent Reza....thanks for sharing this😊
Thanks Naveen
Useful tips & tricks about power automate. one of the best content deliver so far related to power platform. Keep it up and kudos to your effort.
Thank you
Reza.. You are Brilliant .. Valuable tips
Thank You
Wonderful. Thank you very much !
Most welcome
Thank you so much you are saving my day.. really your videos are so useful
Happy to hear that! Thanks for watching.
Thank you so much share this valuable content
My pleasure
This is Genius! Very Good! Thx 2 u
Thank you
thanks Reza you're the best
Most welcome
Thanks again for these tipps. Damn, I love the clipboard function, but that was totally new for me. Thanks! 👍🏻
Concerning the „copy peek code part at 5:35“:
For getting the array without going to the peek-code, I’m
• selecting „expressions“
• enter a space (or whatever),
• change back to „dynamic content“
• select „the Output“
• going back to expression and delete the firstly inserted space and extend the whole expression with the concerning fieldnames.
And last not least:
I love the possibilities the SharePoint _api offers, but there can be done a lot of bad things with it, so I‘ll not present it to our users. 🤐
Yes the api has a lot to offer and a lot can be done with it. It does respect security though. So a user cannot potentially access data they don’t have access to.
@@RezaDorrani how about the „ValidateUpdateListItem()“ API. With this, I can change the Editor/Author fields. So for me, that’s a risk because maybe many user trust in that fields.
You made a useful and amazing video
Glad to hear that
You are the man
Thank You!
Just 👌👌👌
👍
Thanks Reza
Thanks Sundra
Thank you thank you thank you again and again and again.. lol!!! 😊😊😊
You are so welcome!
Thanks a lot! This is amazing.
What other uses does the scope action have besides grouping actions?
You can handle errors for all actions within the scope together + scopes help organize your flows
Thanks for sharing - just love following your channel. Dear Reza! Do you know if there is a max limit of emails in the converted array added to the To: Cc: Bcc: email field? Have a group with +700 users which the solution could be used to send a newsletter for exampel.
Take care and once again thank you for sharing.
Not sure what the max limit is to be honest. Ideally if you have 700 users, would be best to put them in an email enabled security group in AD. You can add security groups to SharePoint groups + you can directly email the group address so all users will get the email.
Thank you Reza for this excellent video. I would suggest for later videos on how we can change the user role to Edit if the user role has view-only before performing the create an item or a file action in SharePoint and after the create action succeed how we can assign back to the same user the view-only role.
Thanks for watching. Will add your suggestion to my backlog
Thank you Reza, appreciate it!
Hi Rezza. Thanks again for a great video for us new users. I have a question related to this video. I have a flow for approving a training request. I have 2 groups that the approval can go to depending on whether the request is coming from an employee on Day Shift (A Shift) or from Night Shift (B Shift). Can you point me to a video that would help me write the expression needed for my flow to be able to choose which Group to put in the Assigned to field based on information coming from my trigger action (When an item is created?
I have done multiple approval based videos and are all placed in a playlist on my channel.
I would recommend checking in that.
Thank you for sharing. Due to we cannot lookup data from Personal or Group column. I am not sure your knowledge sharing can be applied to my scenario? Could you please suggest? Thank you in advance.
Not sure I understood your question
Hi Reza, thank you for all your amazing instruction videos. I have a problem with the Copy to clipboard part of this video, if I follow all the steps I am able to paste the link from the copied actions into the Copy to clipboard but then it refuses to past once I click the part I just copied in. I have that a lot with the Clipboard, most of the times it works when I paste in the same flow but it should work in between flows as well, isn't it? Have you ever encountered this behavior and do you have a solution to it?
I have not faced this issue.
This is great. Is it possible to do this for a custom SharePoint list of users/staff? can I send an email to a specific 'meta data filtered' instance of users in that custom list? Example, if I have 10 users, and 3 are 'Admin'...can i send to just those 3 Admin users within a list of 10 users overall? does this concept work for custom lists using the meta data & person or Group column type?
Concept should work. Flow logic would be different. I would have to recreate your scenario to provide any guidance. I would recommend you post your issue/query with screenshots on the forums at powerusers.microsoft.com
Hey @Reza Dorrani, excellent video. i just implemented this and worked well, but at some time i got error "Access is denied" while getting SP group members using Send an HTTP request to SharePoint..... Please suggest what i need to do in that case?
My guess is the group visibility is set to group owners or members only and you are not an owner or member or you are using incorrect url to SP site or list.
I will have to look at your flow in action to provide guidance. I would recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com
Thank you again for another great video. Is there a limit on how many users you can pull from a SPoint group? My group has 120 users but i'm only returning the first 30. That is also the page limit of the group view. Is that the reason only 30? If so I do not see how to increase the the limit of users on a group page view.
I was not aware of that. As its an API, must have limits. I’m not sure if there is a workaround. Something I would have to investigate on. I will recommend checking on forums in case someone has done something similar
powerusers.microsoft.com
Wow …such a wonderful video…. code snippets to notepad and put into another tenant is fantastic tip.
Question: Is it possible to automate Office 365 Security groups / Microsoft 365 Groups into SharePoint? Meaning, when a new security group has been added at M365 admin center, this new group automatically gets access to specific SharePoint site? Please advise.
Thank You for your kind words.
Key will be to figure out how to trigger a flow when a new Security Group is added & which SharePoint site it needs to have access to?
You could create a manually triggered flow which takes 3 inputs properties.
1 - The ID of the new security group
2 - SharePoint site url
3 - SharePoint Group Name
Then flow can read all the above properties and accordingly assign the AD group to the SharePoint Group for the SharePoint site.
@@RezaDorrani thanks brother for your valuable inputs. 🙏
Hello Reza, Thank you so much for the great videos. your Chanel is the first source I come to get knowledge. Can you please guide how we can get email ids by calling an AD group? My scenario is I have a SharePoint group in which I added an AD group (Instead of individual email ids) so, please guide how i can get email ids to send the email. Thank you
You can read members from AD Group inside SP Group. You will directly need to query AD Group members. This video description has link to sample on how to do that.
@@RezaDorrani Thank you so much. The only great words of thanks i can say Jazaak ALLAH Khayr (My faith words)
Reza, at the beginning of the video, you started talking about midway through your flow, is there a different video that explains the beginning steps of that flow?
Flow that sends the HTML Table as an email?
Here is that video ruclips.net/video/VnWg-Eox37Q/видео.html
Hi Reza, your videos are very informative. In this video you are adding group memebers but what if I wanted to create a custom group? How do you create a SharePoint user group if a group doesnt exist?
I do not have a video reference on this scenario and would have to try it out to know the way it can be done.
I will recommend checking on the forums at powerusers.microsoft.com/ in case someone has done something similar.
Hi Reza, I don't see the "Email Formatting" option on my end; was this option taken out? And thank you so much for your knowledge library; I been learning a lot from you. Thank you!!!
docs.microsoft.com/en-us/power-automate/approvals-markdown-support#links
Hi Reza,
Excellent video! However I would like to know how to trigger emails to multiple groups chosen dynamically from people or groups picker in SharePoint list or power apps?
Thanks
Depends on the flow trigger.
You would have to anyways query SP to get the group members.
I will recommend you check on the forums also at powerusers.microsoft.com/
Super Useful.....had one question can we also get the title & department from the Sharepoint group alonwith the Name and email, thanks in advance...
I believe the JSON response has all the info you need. If not, you could always query Office365Users connector to get the information.
@@RezaDorrani Thanks for quick reply, JSON response is not having the info, but the office365user connector has the info.
Thank you so much Reza, can you please let me know whether it's possible to know whether the one drive files are shared with other users and what is the permission the user is having edit or read.
I would say its possible but I do not have a video reference on this scenario and would have to try it out to provide guidance. I will recommend checking on the forums at powerusers.microsoft.com/ in case someone has done something similar.
Thank you for reply, I have checked the forum.. It didn't help me.
@@divyak8545 You can also ask for help there. Forums will be your best bet as I have not tried this scenario.
Hello Reza. I appreciate your efforts and help for the community. Is there any way to get the list of site collection admins?
You would need to use the SP rest api action in flow to get that. There should be a rest api endpoint to get the site collection admins. You will have to check for that.
Reza, I have a large sharepoint list.
A column in that list indicates what permission group each person should belong in (actually a job title).
Is there a way to have Power Automate add and remove members to Sharepoint permission groups when a new item is added or changed? For instance, if I add someone, can I have the list add them to Permission group A or permission group B (based upon job title). Or, if I change their title, remove them from one permission group and put them in another or if I delete someone, remove them from the permission group.
It seems that should be possible but I can't seem to find a tutorial even similar.
Thank you.
Possible - Yes. Is there a tutorial - I am not sure. I have not done that.
In Azure AD, there is also an option for defining dynamic group membership. Try and explore that option.
I would recommend you check on the forums as well at powerusers.microsoft.com
Ohhh copy and paste the 'scope' is really usefull! Tnx for sharing.
...but when sharepoint groups contains AD security group, where is the practices to recovery mail? I should use http connector for calling graph api?
Yes the Azure AD connector for security groups and the Office 365 group connector for Office 365 groups. The video description has a link to 3 code snippets I have shared. Both Azure AD and Office 365 group are in there.
@@RezaDorrani Great Job, tnx for sharing
@@RezaDorrani i wonder how i can fullfill a special challenge with a Person/Group SharePoint Column with Multivalues. This multivalue Peoplepicker contains many single Users, some SharePoint-Groups, some AD-Security-Groups and also a bulk of Microsoft 365 Groups. All possibilities mixed up in one Column. I dont have a glue how to resolve these Multivalues and the member of the different Groups to semicolon-separated E-Mails or Claims for usage in Flow Approvals or Grant Permissions-Actions
@@karlgerdschneider6965 I would have to try out your scenario to provide any guidance. I would recommend you post your issue with screenshots on the forums at powerusers.microsoft.com/
Thanks for sharing - Is it possible to get email addresses of the members of an M365 group, instead of email addresses of members of a SharePoint group?
Video showcases how to get members of O365 groups which are now renamed as M365 groups.
Excellent, can we copy and past switch too?
I did not try but it should work.
Hello Reza, thanks for sharing knowledge. I have a use case that I need to send a list of items (from excel report)to the department owners they own as a table in the email... Could you please make a video to create custom html tables?
Added to backlog.
So basically get data from SP or excel and create HTML table and send in email?
@@RezaDorrani thank you for responding back. You are right but create table with the items that each owner responsible and send it to owner. When I use create html table, it is creating table with all items, I failed to add right condition.
@@krishnabairi1581 So did u get it working?
@@RezaDorrani not really, it is creating table with all items instead of creating custom table for each owner that they responsible. I need to send an email to each owner with the items they own. My data source is just an excel dump. It will be really helpful if you can assist, I have nearly 1000 emails to send out. I could add plain text in email instead of table but each owner has more than one record.
@@krishnabairi1581 I understand the request but this is something that I would have to tryout and then blog about.
For faster assistance, try posting your query on the community forum powerusers.microsoft.com/t5/General-Power-Automate/bd-p/MPAForum
Hi Reza, I have request to add members to sharepoint group when person is added to a list. I have used send an HTTP request to shareopoint connector. The flow is working perfectly. The problem i am having is that when i add a person manually to a group, i can turn off send email notification but i am not able to do it with the flow. Can you please guide me in how to do it
I have not tried this and hence not sure what the path is. I recommend checking or posting your query on forums in case someone has done something similar powerusers.microsoft.com
How would you use the same filter array but with a Start and Wait for Approval action? I want to get the approver and comments of an approval action (It is first reply only, so just one approval). What syntax would you use?
I think I have covered plenty of scenarios around approvals - ruclips.net/p/PLTyFh-qDKAiFUGTtwSwFT79Y7_jq_Aipe
Hello Reza, I like this one. Is there any way to accomplish this:
When a user can enter the URL for a SharePoint Online site (power app form) and it could return the owners of the SharePoint site? any suggestions please ?
Trigger flow from Power Apps, pass the Site URL, use same technique as in video to get group members (Owners group) and send response back to Power Apps. I have videos on my channel that show how to pass data from power apps to flow and vice versa.
@@RezaDorrani Thanks Reza I am able to get the site owners for one particular site by the membership of of that particular site, but is there any way to get the details for all the sites in the tenant ? I mean any generic membership is for full control users ? I tried to use the role based I'd code but it's not working. Any ideas ?
@@Sunilprakashsabbithi I am not sure about it. Something that I would have to investigate.
@@RezaDorrani Thanks Reza for your prompt reply. Your ideas are so useful as you give all the basics while implement ing them with good explanation.
Thank you Reza, what if I need to ahow the members in gallery instead of sending email?
Power Automate does not have concept of a gallery.
@@RezaDorrani I mean is there a way to send the output to powerapps and the show it in gallery.
@@premsaini4289 There is an action to send data back to power app. You can try using that. I have shown that action in different context in other videos. You can check those.
Hello Reza,
Is there a way to dynamically select the sharepoint groups from the list and send an email for notification purposes?
Where will you select it from?
@@RezaDorrani I've created a list for all my ticket and created a column for the persons/groups to the notified
@@jagadeesanm7875 You can query that list and get the emails to send to. Not something I have a video reference for though.
@@RezaDorrani Exactly, that’s the plan. But in the video you’ve mentioned to consider the ‘id’ of the group, would you mind sharing it how to take that dynamically
@@jagadeesanm7875 I did this video a long while ago and do not remember the specifics.
I would recommend checking or posting your query on forums in case someone has done something similar
powerusers.microsoft.com
Hey is there a way to add members into the yammer groups as well....
Not something I have explored hence not sure
5:38 The code is different for me when I peek code, I have - "from": "@body('Sharepoint_Group_Members')", rather than "from": "@outputs('SharePoint_Group_Members')?['body']",
Does anyone have any suggestions where I've gone wrong, or how to proceed?
Video description has link to download flow snippets. I recommend posting your issue with screenshots on the forums at powerusers.microsoft.com
how to make a flow when I can fetch url from Sp list and return all the site owners of that particular site url...please make a video on that
Will add it to my backlog but this is the first request on this topic. I will need a lot more requests on this topic to give this a higher priority.
Hey Reza, is there a way to dynamically enter that group ID?
It can come from dynamic content. Does not have to be hardcoded
@@RezaDorrani Just how would I get that information? So right now I have a sharepoint list that uses the people/resource column. In there I have groups, how do I pull the group ID from that SP list? Using Get Items, I don't see what dynamically pulled information I can use to capture the group ID within List Group Members
@@TheFearBO I do not have a specific video on this. I would have to try it out to give the exact steps. I will recommend checking or posting your query on forums in case someone has done something similar
powerusers.microsoft.com
How do I fetch Individual office profiles and display only their names alone in the flow
Use the Office365users connector.
@@RezaDorrani yea I'm asking with regards to this video... I want to seperate the name that displays on the mail to just the Individual who receives it
@@nduagubadev Not sure I understand which name. I would recommend you post your issue/query with screenshots on the forums at powerusers.microsoft.com
Please create a video to rename a file or else if you have any link for this please share it
I have seen plenty of solutions around file renaming on the forums. Try posting your query here - powerusers.microsoft.com/t5/General-Power-Automate/bd-p/MPAForum
This is very helpful appreciate!
Your most welcome