Forum Discussion

CamStillHere's avatar
CamStillHere
Regular Visitor
6 years ago
Solved

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...
  • jppp's avatar
    jppp
    6 years ago

    Hi CamStillHere ,

     

    To summarise the steps for hte implicit grant flow with Power BI Embedded and the REST APIs: 

    1. Prompt the user with an Azure AD account to login with its username and password
    2. If successfull you have an id_token
    3. With that id_token you can authenticate to Azure AD together with an application id
    4. If successfull you have an access_token
    5. That access_token you can use to upload the report via the Power BI REST APIs
    6. 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