05-13-2019 07:37 AM
05-13-2019 07:37 AM
I would like to set up an approval flow for the SharePoint access requests. So here is the scenario;
We have a library of folders with confidential information. It has access permits only to small group of people. But now and then, other people need to work on some of the folders and they request access from me as I am the site owner. As we are big organization, it is very difficult to understand if the requester should have their access rights granted. My solution idea is to build up a flow;
-Whenever an access request arrives from a colleague (lets give them a name: Jack), get Jack's manager user account
-Start an approval process with email of the Jack's manager
-Once manager approves, give access rights to Jack
-If his manager denies, reject Jack's request
Unfortunately, I couldn't find the trigger I need. Does anyone have an idea about how to solve it?
Any return will be appreciated! Thanks in advance.
05-15-2019 08:05 PM
If your notification to the request comes as an email (I'm making an assumption as I'm not a SP site owner so I don't see how you get them), you could try using On new email and filter out to the words in the Subject line.
This will then let you configure the approvals and take it from there.
Hope that helps.
05-20-2019 02:53 AM
Dear @Damien Rosario ,
Thank you for your message! I've tried your method but failed unfortunately. Access requests come from a common email address (firstname.lastname@example.org) for every request. Therefore, setting a flow trigger with new mail won't work as I need this flow to be active only for 1 library but not whole site. Also, I will need user name to be used on "Get Manager" action and it couldn't extract the user information from the email. But thank you anyway, I appreciate your support!
05-22-2019 09:02 PM
Out of curiosity, are you able to please provide a redacted email (just hide the username or any other sensitive info) so I can see the content of the request that you receive?
I'm curious to see the roadblocks in the email and perhaps maybe come up with a creative solution depending on what's in it!
05-23-2019 04:24 PM - edited 05-23-2019 04:34 PMSolution
Thanks for the info. These images appear to already be approved to access the Site Pages but I think I get the gist of what you are saying.
Have you thought about going down a different road and use Microsoft Forms to source the initial request?
Step 1: Fill in some fields in the Microsoft Form
e.g. Might be a drop down list of folder names within the site that people may need to access. The user will select the appropriate file. It may even only be this one field.
Step 2: User submits the form.
Step 3: Microsoft Flow picks up the form submission and sources the users manager
(a) Use 'When a new response is submitted' as the trigger.
(b) Use 'Get response details' to retrieve the forms info.
(c) Use 'Get manager (V2)' using the responders email address (found in step b). This should bring up their managers details.
(d) You can extract the managers email address to use for the approvals process (use something like 'Start and wait for an approval (V2)'.
(e) Manager reviews the approval and hits approve/reject.
(f) Use a Condition to then say If:
- Approve, then sends you an email to say so with the appropriate user details, manager details, etc to action.
- Reject then send a message to the requester saying that their access has been denied by their manager (I assume that you don't want to be bothered to know if someone has been denied).
Check out below, I've mocked up the first part of the process that I've just described.
You could embed the form into a SharePoint page that users can access when they need to make their request and/or just send them the link to the form.
This might be a better way to go given the challenges with the SharePoint no-reply emails?
Cheers and best wishes