Hi all,
Just to share with the community, because I have been struggling with this for a few days until I open a ticket to Microsoft.
I have a flow that in some point grants access to a file stored on a Sharepoint Library. I'm using the user's email address to grant access and realized one rare behaviour. Notify recipients is not activated as we have a personalized email notification. An we are sending the direct link to the file (https://mydomain.sharepoint.com/sites/mysite/mylibrary/folder/subfolder/filename.mp4).
The grant access action is returning an status code 200, but when checking file permissions on Sharepoint, nothing was there. This only occurs with one single user, no matter which file is trying to access. Same file works for any other user.
So after try and investigate, we realized that if there is an ambiguous email address, the grant access action will not grant direct access to the file, but will create a link instead only for this single user (image below).
For example, if there are two emails in your company like user@domain.com and user@domain.com.mx will make the grant access action to return a shared link access instead of a direct access.
Because of that, the direct link to the file I use in the personalized email will not work. The workaround to fix the issue was to user the Find O365 users action to extract the UPN for the user. Then use the UPN within the grant access action and that's it, the grant access action will give direct access to the file and not a shared link.
So hopefully this may help someone else. And would be nice a review on this behaviour from Microsoft side or just include it on the documentation of the connector.

Report
All responses (
Answers (