I am quite new to Flow and I want that after an approval process, the user has access to a sharepoint site. How can I get Flow to register this new user with read permissions? Any help will be greatly appreciated.
Solved! Go to Solution.
Use the single quotes for getByEmail('email.com')
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video Tutorials
You can achieve this by couple of flow actions.
You need to use the Send an HTTP request to SharePoint flow action to get the user prinicipal id using email address.
_api/web/SiteUsers/getByEmail('useremail.com')
Next assign the read permissions for this user using Send an HTTP request to SharePoint
_api/lists/getByTitle(โContractsโ)/items(1)/roleassignments/addroleassignment(principalid=<principalid>, ,roledefid=1073741826)
Please see this blog for more details:
https://sergeluca.wordpress.com/2018/05/03/assign-unique-permissions-to-a-document-with-the-new-send...
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsThanks for your answer. I tried what you indicated but still giving error. Is the syntax that I use correct?
The error message is:
{
"status": 400,
"message": "La expresiรณn \"web/SiteUsers/getByEmail(SERGIO.CAROL@CATALANAOCCIDENTE.COM)\" no es vรกlida.\r\nclientRequestId: c8961e7c-0bfc-438d-8ccf-2729f17a0429\r\nserviceRequestId: f8b3fc9e-10ed-1000-2b9f-97c69445bd5c",
"source": "https://grupocatalanaoccidente.sharepoint.com/sites/TrabajoflexibleGCO/_api/web/SiteUsers/getByEmail...)",
"errors": [
"-1",
"Microsoft.SharePoint.Client.InvalidClientQueryException"
]
}
Use the single quotes for getByEmail('email.com')
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsJoin digitally, March 2โ4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.
User | Count |
---|---|
88 | |
58 | |
42 | |
37 | |
36 |
User | Count |
---|---|
85 | |
72 | |
61 | |
56 | |
40 |