How to retrieve logged in user's authorization code for getting the auth token for an extranal REST API integrated with AAD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2016 06:16 AM
Hello,
I have a scenario where I need to access a Azure Active Directory authorization enabled Azure Web Api endpoint for Script Include code. I want to use the logged in user's auth code to retrieve the auth token for the AAD resource. Any pointers on how to achieve this?
I have tried configuring a REST API endpoint, but that doesn't have to the option to provide the "AudienceUri" / "ResourceID" of the resource for which I want to acquire the authorization token.
Thanks
Vamsee
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2021 04:03 AM
Although, post is very old I still thought this would help.
Ideally in this case you should use service principal authentication.
Create an App in your AAD for this specific purpose, use it's clientId and secret to generate Auth token and use that to call your API.