cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RoosW
Frequent Visitor

How to trigger a flow for a guest account in Sharepoint

Hi all, we are just now adopting flow in our Office 365 environment and really need some help with how to automate some worksflows on one of our SharePoint portals.

 

We have an Examiner Training SharePoint site used for sharing material with external users invited as guests in Azure. These users are given access to the SharePoint site through a Security group in AAD.

 

There are 3 doc libraries that the admin then gives these guest users access starting at stage 1 (doc library 1) then stage 2(doc library 2) and so on.

There is quite a lot manual input required to first 1) Invite users and add to security group in ADD

                                                                                2) Add user to SP group stage 1

                                                                                3) Email user and let them know they have access and what they need to do

                                                                                4) Confirmation from user on completion of tasks

                                                                                 5) Repeat with stage 2, 3 etc 🙂

Im really stuck on how to approach this. Any advice or feedback greatly appreciated

1 REPLY 1
PatrickMSFT
Microsoft
Microsoft

RoosW,

 

Are you running into anything specific in the process you outlined? Or just trying to gauge what's possible here? I can try to outline some options for you!

 

1) Invite users and add to security group in ADD
Maybe you could do something with a custom connector using the SPO API but we don't currently have any connectors that manage the invite process in SPO/ODB. You can add a user to a group, though. The tough part is that "Add member to group" insists on a UPN, which external users have a very unique version of; usually containing an #EXT# and some unique conventions. You could maybe use Get user profile (V2) earlier in the logic, go by email address and see if it can pull the user from the profile store. Once you can bring the user into the Flow, you can start using dynamic content from that user in other steps/connectors.

 

Reference:
https://docs.microsoft.com/en-us/connectors/office365groups/#add-member-to-group 
https://docs.microsoft.com/en-us/connectors/office365users/#get-user-profile-(v2) 
https://docs.microsoft.com/en-us/power-automate/get-started-flow-dev  

 

2) Add user to SP group stage 1
You can use the "Grant access to an item or a folder" SPO connector. This is essentially like the Share dialog in SPO, where you can impose Can view/Can edit permissions to select users and send them a sharing invitation. To be clear, this is not like external sharing.

 

Reference:
https://docs.microsoft.com/en-us/connectors/sharepointonline/#grant-access-to-an-item-or-a-folder 

 

3) Email user and let them know they have access and what they need to do
You should be covering this in Step 2 above, a sharing invitation should be sent to the user.

 

4) Confirmation from user on completion of tasks
This reads a lot like an Approval process and might be worthy of a unique Flow or a child Flow. We have a robust Approvals process in Power Automate already and you can start that up, wait for input and then complete from there. It's an involved process but you can also use Content Approval in SPO with Flow but it requires very specific input, you'll want to use the linked guide below. Our Schedule connectors are not state dependent, they're based on timing so it seems some kind of approval process will be needed.

 

Reference:
https://docs.microsoft.com/en-us/connectors/approvals/#start-and-wait-for-an-approval 
https://docs.microsoft.com/en-us/connectors/sharepointonline/#set-content-approval-status 
https://docs.microsoft.com/en-us/sharepoint/dev/business-apps/power-automate/guidance/require-doc-ap... 
https://flow.microsoft.com/en-us/blog/helpful-tips-for-using-child-flows/

 

5) Repeat with stage 2, 3
We have Controls you can impose in your Flows. You can Apply to Each, Do Until, use branching with a Condition and more.

 

Reference:
https://flow.microsoft.com/en-us/blog/build-more-powerful-conditions-in-flows-and-more/

 

I hope this helps get you started!

 

Sincerely,
Patrick

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Kudoed Authors
Users online (2,181)