Forum Discussion
REST API Generate access token
- 3 years ago
Hi Anonymous ,
If you want to use Postman, the request URL for a service principal must be
https://login.microsoftonline.com/{tenantID}/oauth2/v2.0/token, but for a master user, it can be eitherhttps://login.microsoftonline.com/{tenantID}/oauth2/v2.0/tokenorhttps://login.microsoftonline.com/common/oauth2/token.For more details, please refer to this thread
Besides, here is a document about this, hope it could help you.
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 3 years ago
Hi Anonymous ,
Consuming Power BI content requires an access token. Depending on your solution, this token can be either an Azure AD token, an embed token, or both.
- Azure AD Token
For both embed for your customers and embed for your organization solutions, you need an Azure AD token. The Azure AD token is required for all REST API operations, and it expires after an hour.
- Embed Token
When you use the embed for your customers solution, your web app needs to know which Power BI content a user can access. Use the embed token REST APIs to generate an embed token, which specifies the following information:
- The content your web app user can access
- The web app user's access level (view, create, or edit)
If you are still confuse about it, here are some documents about token. Hope they could help you!
Permission tokens needed for embedding a Power BI app - Power BI | Microsoft Learn
Microsoft identity platform access tokens - Microsoft Entra | Microsoft Learn
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
If you want to use Postman, the request URL for a service principal must be https://login.microsoftonline.com/{tenantID}/oauth2/v2.0/token, but for a master user, it can be either https://login.microsoftonline.com/{tenantID}/oauth2/v2.0/token or https://login.microsoftonline.com/common/oauth2/token.
For more details, please refer to this thread
Besides, here is a document about this, hope it could help you.
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous3 years agoNot applicable
Hey Jianbo,
thanks for the link to the relative answer, honesty I am still try to figure it out how to make this authentication process works; at least for me, the documentation is not clear. Anyway, when I will find a clear and straightforward solution, I will write it here.