Announcements
Dear sir ,please help me solve this problem which is
when i want to download file from onedrive , which i use this function below to open downloaded file,
but every time i open it on brower, it always generate randomly url
Hello, @peoplehelpme ! , Normally, each item in OneDrive possesses a distinct file ID and a unique file name. You can acquire metadata for your items by utilizing API calls. For more information, refer to the relevant documentation. - Get a file or folder - OneDrive API - OneDrive dev center | Microsoft Learn
I'll be guiding you through the process of implementing dynamic URLs with illustrative examples.
Consider a scenario where there's a document file named "Sampledoc" located in two separate folders within SharePoint, as outlined below:
1. Docs1(Folder name) --> Sampledoc.docx(https://xyz-my.sharepoint.com/:w:/r/personal/xyz_onmicrosoft_com/_layouts/15/Doc.aspx?sourcedoc=%5B1DBE2358-BD3C-49E7-851A-6A92BB3DA8BC%7D&file=Sampledoc.docx&action=default&mobileredirect=true)
2. Docs2(Folder name) --> Sampledoc.docx(https://xyz-my.sharepoint.com/:w:/r/personal/xyz_onmicrosoft_com/_layouts/15/Doc.aspx?sourcedoc=%8B8A9D1E3C-25EC-4D22-8819-BFBFA7B818B0%7D&file=Sampledoc.docx&action=default&mobileredirect=true)To access them in URL(you write action for download later), I have created list where I kept only document id's like below of my two documents.
Since document name same in the both folder I have used the below action to open them in edge browser by looping list like below
As the loop iterates and opens the documents dynamically in the Edge browser, you can further enhance the solution by adding a download logic to complete the process.
I hope that these instructions provide the necessary guidance for your implementation process.
Hi @peoplehelpme
Instead of relying on the GUI / URL of the document, It's better you connect using the API request
Also, if your business case don't involves any desktop application then it is very good you build a power automate cloud flow instead of desktop flow
If you find this reply helpful, please consider giving it a LIKE AND
If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION
Thanks,
Srini
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
David_MA 229 Super User 2026 Season 2
11manish 223 Super User 2026 Season 2
Valantis 136 Super User 2026 Season 2