Forum Discussion
CamStillHere
6 years agoRegular Visitor
Is it possible to use an API Bearer to load a report preauthenticated
I have a rest application with Power BI. I upload a dataset and generate a report. After the report is uploaded I would like to show the user the report. They have already authenticated to use my RE...
- 6 years ago
Hi CamStillHere ,
To summarise the steps for hte implicit grant flow with Power BI Embedded and the REST APIs:
- Prompt the user with an Azure AD account to login with its username and password
- If successfull you have an id_token
- With that id_token you can authenticate to Azure AD together with an application id
- If successfull you have an access_token
- That access_token you can use to upload the report via the Power BI REST APIs
- Use the same access_token as part of the config (together with tokenType: models.TokenType.Aad) with the Power BI Embedded SDK, see https://docs.microsoft.com/en-us/azure/active-directory/develop/scenario-spa-overview for more information.
If I understand correctly you have already implemented the first 5 steps and you only need to implement step 6.
-JP
CamStillHere
6 years agoRegular Visitor
Thank you again, but could you elaborate the workflow to get that working?
jppp
Continued Contributor
6 years agoHi CamStillHere ,
To summarise the steps for hte implicit grant flow with Power BI Embedded and the REST APIs:
- Prompt the user with an Azure AD account to login with its username and password
- If successfull you have an id_token
- With that id_token you can authenticate to Azure AD together with an application id
- If successfull you have an access_token
- That access_token you can use to upload the report via the Power BI REST APIs
- Use the same access_token as part of the config (together with tokenType: models.TokenType.Aad) with the Power BI Embedded SDK, see https://docs.microsoft.com/en-us/azure/active-directory/develop/scenario-spa-overview for more information.
If I understand correctly you have already implemented the first 5 steps and you only need to implement step 6.
-JP