cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
BanksySan Frequent Visitor
Frequent Visitor

Cannot get access token

I'm getting very stuck trying to get an access token in order to embed a PowerBI report.

 

The report in PowerBI https://app.powerbi.com/groups/me/reports/80106298-cf83-480a-aba4-c679ffac1535 

 

  1. Is the  report ID 80106298-cf83-480a-aba4-c679ffac1535?
  2. How do I find the Group ID?

 

I'm using the PowerBIEmbedded_AppOwnsData sample.

 

 

  <appSettings>
    <add key="webpages:Version" value="3.0.0.0" />
    <add key="webpages:Enabled" value="false" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />

    <add key="authorityUrl" value="https://login.windows.net/common/oauth2/authorize/" />
    <add key="resourceUrl" value="https://analysis.windows.net/powerbi/api" />
    
    <add key="apiUrl" value="https://api.powerbi.com/" />
    <add key="embedUrlBase" value="https://app.powerbi.com/" />
    <add key="clientId" value="Client ID from registering" />
    <add key="groupId" value="1" />

    <!-- The id of the report to embed. If empty, will use the first report in group -->
    <add key="reportId" value="" /> 

    <!-- Note: Do NOT leave your credentials on code. Save them in secure place. -->
    <add key="pbiUsername" value="My Azure Username" />
    <add key="pbiPassword" value="My Azure Password" />
    
  </appSettings>

 Should I be replacing the Authority URL with the OAuth 2.0 Authorization Endpoint in my Azure AD's Registered Applications properties?  (https://login.microsoftonline.com/{tenancy_id}/oauth2/authorize)

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Cannot get access token

HI @BanksySan,


I think you can refer to below link to know how to get group id list.

Get Groups

 

If current group means your personal 'myworkspace', it is impossible to get group id from my workspace.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Cannot get access token

HI @BanksySan,


I think you can refer to below link to know how to get group id list.

Get Groups

 

If current group means your personal 'myworkspace', it is impossible to get group id from my workspace.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 46 members 927 guests
Please welcome our newest community members: