Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
Syndicate_Admin
Administrator
Administrator

Onedrive generate links (embed codes) in bulk

Nice day

I have about 5,000 images that are required to be used for a development in power bi, because it is high definition I did not opt for the binary form (Encoding 64), the update was very slow. It was considered sharepoint but you have external clients and generating access is not optimal. Finally, onedrive was seen.

Where now the situation is to generate embed codes, (<iframe src="https://xxxx-my.sharepoint.com/personal/xxxx_layouts/15/embed.aspx?UniqueId=616dcb0f-c37b-46ac-b449-..." width="640" height="360" frameborder="0" scrolling="no" allowfullscreen title="xxxxxx"></iframe>

But in bulk, I changed in the example personal data to X. (I have only seen a few tutorials and they handle it image by image) and what I saw is free of access without generating credentials, the question is:

Is there a method to generate embed codes in bulk, from an entire OneDrive folder, or even in batches of 100 by 100.

Thanking you for the support!!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,@Syndicate_Admin 

Regarding the issue you raised, my solution is as follows:

1.Use the OneDrive API to get a list of all the files in the folder

Use the Microsoft Graph API - Microsoft Graph | Microsoft Learn

Then use the PowerBI API to import the embedded code into the PowerBI report.

Power BI REST APIs for embedded analytics and automation - Power BI REST API | Microsoft Learn 

Call a REST API method

{HTTP method} https://graph.microsoft.com/{version}/{resource}?{query-parameters}

 

2.You can also use powerbidesktop to read the file data in OneDrive, then use powerquery to process the data and upload it to the service to generate an embed code.

Use OneDrive for work or school links in Power BI Desktop - Power BI | Microsoft Learn

Embed a report in a secure portal or website - Power BI | Microsoft Learn

vlinyulumsft_0-1719993809608.png

 

3.Finally, you can also use Power Automate to create a process that automatically fetches a list of files and generates the corresponding embed code for PowerBI.

Create a Power Automate visual for Power BI - Power BI | Microsoft Learn

vlinyulumsft_1-1719993821644.png

 

 

If you have any new discoveries, please feel free to share them with us.

 

Best Regards,

Leroy Lu

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

1 REPLY 1
Anonymous
Not applicable

Hi,@Syndicate_Admin 

Regarding the issue you raised, my solution is as follows:

1.Use the OneDrive API to get a list of all the files in the folder

Use the Microsoft Graph API - Microsoft Graph | Microsoft Learn

Then use the PowerBI API to import the embedded code into the PowerBI report.

Power BI REST APIs for embedded analytics and automation - Power BI REST API | Microsoft Learn 

Call a REST API method

{HTTP method} https://graph.microsoft.com/{version}/{resource}?{query-parameters}

 

2.You can also use powerbidesktop to read the file data in OneDrive, then use powerquery to process the data and upload it to the service to generate an embed code.

Use OneDrive for work or school links in Power BI Desktop - Power BI | Microsoft Learn

Embed a report in a secure portal or website - Power BI | Microsoft Learn

vlinyulumsft_0-1719993809608.png

 

3.Finally, you can also use Power Automate to create a process that automatically fetches a list of files and generates the corresponding embed code for PowerBI.

Create a Power Automate visual for Power BI - Power BI | Microsoft Learn

vlinyulumsft_1-1719993821644.png

 

 

If you have any new discoveries, please feel free to share them with us.

 

Best Regards,

Leroy Lu

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

 

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.