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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Peter_Jeyaraj_I
Helper II
Helper II

PowerBI Connection to Synergi life API

Hi, 

My API connection works well in Postman, but i was not able to establish/authenticate the connection in PowerBI. 

I tried, Web option and Advance editor. Anyhow, i am new to the API side, so not sure what went wrong. Here below i shared some screenshots, Please support
Request provides the response in Postman

Peter_Jeyaraj_I_0-1642667521980.png

 

One of the option i tried. Apart from below i tried, Basic option and entered the APIKey as a username and the API option.

Nothing works. 

Peter_Jeyaraj_I_1-1642667586972.png

 

Let me know if you need any more info. Thanks in advance

7 REPLIES 7
v-henryk-mstf
Community Support
Community Support

Hi @Peter_Jeyaraj_I ,

 

According to your description, to call this api in Power BI, you need to create an application in the Power BI Developer's Portal. This application provides reusable client ID and client key with which we can generate the embedded token required for the REST API.  link

vhenrykmstf_0-1643007155776.png

Follow the steps in the following blog to test again.

vhenrykmstf_1-1643007268115.png


If the problem is still not resolved, please point it out and provide related operation screenshoots. Looking forward to your feedback.


Best Regards,
Henry


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

Hi Henry, 

Thanks for your inputs. 

Getting below error msg when i try the "Authorize User" Step, while registering the app in PowerBI

Peter_Jeyaraj_I_0-1643017151008.png

 

Hi @Peter_Jeyaraj_I ,

 

Please log in Azure portal with the account registered that app and grant permissions.

vhenrykmstf_0-1643018321491.png

Refer to the relevant official documentation as below:

Delegate application management administrator permissions - Azure AD | Microsoft Docs

Register an app to embed Power BI content in a Power BI embedded analytics application - Power BI | ...


Best Regards,
Henry


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

Hi @v-henryk-mstf ,

 

Added the permission via Portal.azure.com. anyhow, still getting the same error msg. 

Peter_Jeyaraj_I_0-1643021200943.png

Getting below msg, when i try to get data via PowerBI. 

Peter_Jeyaraj_I_1-1643021376741.png

 First time exploring this API, so not sure whether i am following the right steps. If possible, could you please share the step by step process for API authentication in PowerBI.. It would be great help for me. 

It works now by using the token number generated from postman. hope I can able to proceed further. will come back if i stuck again

Hi @Peter_Jeyaraj_I ,

 

Thank you very much for your feedback. If the advice I provided was helpful to you, you can mark it as the correct solution to help the other members find it more quickly.


Looking forward to your reply.


Best Regards,
Henry


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

Hi @v-henryk-mstf , 

Moved to the 2nd step, but still i am getting the below erros while generating the token number. 

M-Query

let
// Basic auth
authKey = "Basic ****************************",
url = "https://api-e2e.danfoss.com/oauth2/token",
// bearer token
GetJson = Web.Contents(url,
[
Headers = [#"Authorization"=authKey,
#"Content-Type"="application/x-www-form-urlencoded;charset=UTF-8"],
Content = Text.ToBinary("grant_type=client_credentials")
]
)
in
GetJson

 

Error msg

 

Peter_Jeyaraj_I_0-1643276981725.png

 

See the working http from postman

 

Peter_Jeyaraj_I_1-1643277106838.png

thanks in advance for your support

 

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Top Solution Authors