Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I've only been using PowerBI for a short time.
I'm using the Rest services of Power BI, from a web application, and to obtain the Token, I use the following call (although logically embedded in .NET code):
It works correctly when consumed from local, but when we deploy to the development environment, and we try to obtain a Token Oauth2, the application gives an error "System.OperationCanceledException", "The operation was canceled", and we do not get more information about the error.
What can be the reason for the error?
I registered my application, with the "Onboarding Embed tool (https://app.powerbi.com/embedsetup)", with the "Embed for your organization" option, obtaining the clientId and the client secret (https://app.powerbi.com/embedsetup/UserOwnsData?session_id=bb51d392-241c-452b-9e0a-cb4ac91c8e6b).
Perhaps it is necessary to register the powerbi application in Azure, and the clientId and client Secret are not valid for other environments, such as development?
Thank you very much
Thank you very much for the reply!
Although I will review the points mentioned, I still have the doubt, why the token obtaining service, which is invoked with the url https://login.windows.net/common/oauth2/token, works from postman, it also works running the application .Net in Local, and it does not work when the application is deployed to a server, giving an error "System.OperationCanceledException", "The operation was canceled".
On the other hand, from the server itself, if it returns Token, if the url is called from Postman.
What explanation can you have?
Perhaps a redirect url is needed, when deploying to a server?
Hi @Anonymous ,
You can refer the following links to embeded the content for the organization into your application...
Embed a Power BI report in an application for your organization
Step 1 - Configure your Azure AD appWhen your web app calls Power BI, it needs an Azure AD token to call Power BI REST APIs and embed Power BI items such as reports, dashboards or tiles.
If you don't have an Azure AD app, create one using the instructions in Register an Azure AD application to use with Power BI.
To configure your Azure AD app, follow the instructions in Configure your Azure AD app.
Step 2 - Get the embedding parameter values
Step 3 - Add the required NuGet packages
Step 4 - Enable server-side authentication
Step 5 - Build your app's client side
Step 6 - Run your application
Embedded Power BI reports with ASP.NET Core
Embed Power BI Report for Organization using User Owns Data
Best Regards