Generate Access Token via Managed Identity

Rohit 256 Reputation points
2023-10-30T14:42:15.88+00:00

Hello,

I am following this query : https://stackoverflow.com/questions/74017863/adf-web-activity-get-access-token-with-post-api-using-system-assigned-managed-id

 

Can someone help me generate an Access token just based on Managed identity and no usage of Service principal

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
{count} votes

1 answer

Sort by: Most helpful
  1. Dronec 181 Reputation points
    2023-11-04T09:48:31.59+00:00

    There's a bit hacky method to actually get the token for a managed identity in ADF. In order to do that, you need to use either an external HTTP request mirror service or make an internal one (which is relatively easy using, say, Logic Apps or Azure Functions). Here's a working example I just tested:

    User's image

    The external HTTP request mirror I used (disclaimer: don't do this in production!) is https://apichallenges.herokuapp.com/mirror/request

    The result I got is:

    Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUz****lHbW55RlBraGMzaE91UjIybXZTd******I6IjlHbW55RlBraG***uTG83WSJ9.eyJhdWQiOiJodHR

    which you can use for your nefarious needs.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.