Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi All,
I ran into a very strange problem, I‘ve registered an application (service principal) on Azure, set PBI permissions, get Application ID and tenant ID and applicationSecret, I used this service principal to generate an AAD token, and then take this AAD token to request the PBI embed token, currently work, but after a period of time, the AAD token request PBI embed token cannot be obtained, I need to register a new one(APP Register) on Azure, and then take this new service principal to request that can work again, what is the problem? Is the AAD token expired. Thanks.
My code is C# code, refer to the following project:
具体代码如下截图:
Solved! Go to Solution.
Hi @simonlxd ,
AAD token does have expiration (default is 1h). Do you renew it before calling the Power BI API?
What is the error you're getting when the request to generate an embed token fails? Did you check if the response body contains information regarding the reason of the failure?
Hi @AmosHersch
Thanks for your response. Based on your idea, I checked it again. I found that trial AAD token generate is limited.
https://learn.microsoft.com/en-us/power-bi/developer/embedded/move-to-production
it says: "The number of embed trial tokens a Power BI service principal or master user (master account) can generate is limited." BTW, if i always create new service principal to generate embed token when it limited, is that work? 😂
I don't know if the limit of free tokens is per user or per tenant.
AFAIU customers are expected to use trial tokens when testing their embedded solution, and later when moving to production purchase dedicated capacity so they will get unlimited number of tokens.
Hi @simonlxd ,
AAD token does have expiration (default is 1h). Do you renew it before calling the Power BI API?
What is the error you're getting when the request to generate an embed token fails? Did you check if the response body contains information regarding the reason of the failure?
User | Count |
---|---|
10 | |
5 | |
4 | |
4 | |
3 |
User | Count |
---|---|
14 | |
9 | |
5 | |
5 | |
4 |