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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
amsrivas
Helper IV
Helper IV

Call API from Power BI Report

Hello Everyone,

How to call API (To download attachment from Microsoft Team meetings) in Power BI Report.

Also, share

           - API which can download attachement from Microsoft Teams meetings

           - Steps to call the API from Power BI report.

 

Thanks Amit 

10 REPLIES 10
amitchandak
Super User
Super User

@amsrivas , Download team means the file we load to team/group.

 

Refer : This blog on community how to use API, if this can help 2nd question -https://community.powerbi.com/t5/Community-Blog/Calling-REST-APIs-and-Parsing-JSON-made-simple-with-...

Hi  @amitchandak 

 

My requirement is to download an attachment from the Meetings of Microsoft Team.

Thanks

Amit

Greg_Deckler
Super User
Super User

@amsrivas Are you wanting to import data that is stored on a Teams site? It is really a SharePoint Online site behind the scenes so just use the method for that if this is the case.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler 

 

My requirement is to download an attachment from the Meetings of Microsoft Team.

 

If it is also sharepoint list, could you please let me know the location where it is stored.

 

Thanks

Amit

@amsrivas Missed that, you are going to need this reference here then if you have not already seen it. https://docs.microsoft.com/en-us/graph/choose-online-meeting-api


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler 

 

Thanks for sharing API detail, could you please guide me on how to call API in Power BI report as well.

 

Thanks

Amit 

@amsrivas Ah, for that you should talk to @ImkeF  or @edhans 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Hi @amsrivas ,

for most endpoints of the Graph API you need a custom connector: https://www.thebiccountant.com/2019/04/17/graph-api-custom-connector-power-bi/

But first you have to search through the API documentation @Greg_Deckler  has mentioned to find the endpoint that delivers what you're after.

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Hi @ImkeF 

 

Thanks for the Reply.

 

I am able to fetch the content of attachment by using API call but my requirement is to DOWNLOAD the attachment as a file from Teams Meeting.

I just wanted to download attachment as a file to some location.

 

Note - I tried with Power App/Power Flow with custom connector (premium connector) however i do not have Premium version, so i am looking some work around via Power BI (Pro version)

 

Thanks

Amit 

Thanks for clarification @amsrivas .-

You can create GET and POST requests with Power Query.

So if you have a storage that you can write to using POST requests, you can use Power Query for it.

Just have in mind, that Power Query is not meant for that, as it will often execute the commands multiple times.

So you have to cater for the files to be overwritten.

The binary content of the downloaded file has to be passed into the Content-section of the body:

 

https://blog.crossjoin.co.uk/2014/04/19/web-services-and-post-requests-in-power-query/

 

 

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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