cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to set password in 'Create sharing link for a file or folder' in Sharepoint action

I want to share folder to anyone with password like what I can do in Sharepoint manually.

I only find 'Link Expiration' in 'advanced options'.

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @Anonymous ,

 

Unfortunately, Create sharing link for a file or folder action does not support setting password currently. I am afraid that there is no suitable way to achieve your needs.

 

If you want a similar feature to be supported by MS Flow, please consider submitting your suggestion on the ideas forum so it might be considered for future releases.

https://powerusers.microsoft.com/t5/Power-Automate-Ideas/idb-p/FlowIdeas

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-bacao-msft
Community Support
Community Support

 

Hi @Anonymous ,

 

Unfortunately, Create sharing link for a file or folder action does not support setting password currently. I am afraid that there is no suitable way to achieve your needs.

 

If you want a similar feature to be supported by MS Flow, please consider submitting your suggestion on the ideas forum so it might be considered for future releases.

https://powerusers.microsoft.com/t5/Power-Automate-Ideas/idb-p/FlowIdeas

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
djje87
New Member

I appreciate this question was asked nearly two and a half years ago - but it came up in a Google search when I was looking to do the same thing.

 

Although the in-built "Create sharing link for a file or folder" SharePoint action still doesn't support adding a password to "Anyone" links, you can instead create such a link (and more!) using the "Send an HTTP request to SharePoint" action. This essentially opens up the wider SharePoint API to be consumed in the Power Platform.

 

Here's the endpoint/URL to POST to

_api/web/Lists('YourLibraryGUID')/GetItemById('YourItemID')/ShareLink

 

Here's the request body

{

    "request":{
        "createLink":true,
        "settings":{
            "allowAnonymousAccess":true,
            "linkKind":6,
            "role":1,
            "restrictShareMembership":false,
            "updatePassword":true,
            "password":"YourPassword",
            "scope":0
        }
    }
}

 

Use your browser's developer tools to see what requests the browser sends when you click the UI in SharePoint - from there you can figure out the API (as well as Googling it!).

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,356)