0
votes

I need to get the bearer access token for azure service principal. I want to use it in Angular application to embed power bi report.

Given that I have principial Id and secret and tenant id, how can I obtain it?

to be more specific: I have service principal with client_id and client_secret. I can obtain the bearer token by AppOwnData Way using .NET Core. shown in this link.

https://github.com/microsoft/PowerBI-Developer-Samples

But my case I don't want to use any backend code and want to get bearer token for service principal in angular.

1

1 Answers

0
votes

you can refer to the following code sample: https://github.com/Azure-Samples/ms-identity-javascript-angular-spa-aspnetcore-webapi

The sample talks about calling an ASP .NET web api using an Angular SPA.