0

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.

Saiful Islam
  • 186
  • 1
  • 3
  • 13

1 Answers1

0

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.

  • But my case I don't want to use any backend code and if possible want to get bearer token for service principal in angular. – Saiful Islam Feb 16 '21 at 13:19
  • Hi, we do not have a ready sample for that but I can share the details that you update the above sample code with. The only thing that you need to update in the above sample would be in case of the Web API, just go ahead and mention the App Details of another app registered in AAD and fetch a token from AAD for that app. Rest of the process would remain the same. – SouravMishra-MSFT Feb 16 '21 at 13:30