Forum Discussion
Get token of report
- 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.
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/api2. Invoke the "generate embed token" API.
If there aren't any roles, you don't need to specify the identities.
Best Regards,
Dale
Hi, Dale,
I've tried embed sample, and got this error:
The user or administrator has not consented to use the application with ID. Send an interactive authorization request for this user and resource.
So, does it mean that I need to send request to administrator of AD?
Regards,
Yerkhan
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.
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
2. Invoke the "generate embed token" API.
If there aren't any roles, you don't need to specify the identities.
Best Regards,
Dale
- ysapiyev7 years ago
Responsive Resident
Thanks. I was able to get embed token by granting permission.
However, POST till gave me error.
Regards,
Yerkhan
- v-jiascu-msft7 years ago
Microsoft Employee
Hi Yerkhan,
What's error message exactly?
Best Regards,
Dale- ysapiyev7 years ago
Responsive Resident
Here is error:
Tenant name 'replace_with_your_tenant_id' specified is not a valid DNS name and not valid external domain format
Regards,
Yerkhan