Forum Discussion

ysapiyev's avatar
ysapiyev
Responsive Resident
7 years ago
Solved

Get token of report

Hi everyone   I have a question regarding embed token of report to insert it in Azure web app. Currently, I followed video instruction from Guy in cube regarding getting token and I got error. Al...
  • v-jiascu-msft's avatar
    v-jiascu-msft
    7 years ago

    Hi Yerkhan,

     

    Regarding the error, please refer to #grant-admin-consent-to-enterprise-apps-in-the-azure-portal for a solution. Please also refer to the snapshot below.

    Get-token-of-report

     

    In order to get the embed token, we need to get a valid access token first, then invoke the REST API with it to get the embed token. Please refer to the snapshots below.

    1. Get an access token.

    POST https://login.microsoftonline.com/replace_with_your_tenant_id/oauth2/token
    resource: https://analysis.windows.net/powerbi/api

    Get-token-of-report2

    2. Invoke the "generate embed token" API.

    Get-token-of-report3

    If there aren't any roles, you don't need to specify the identities.

     

    Best Regards,
    Dale