![]() ![]() Save the following code as get-tokens.py on your local machine. Install the MSAL Python SDK on your local machine by running pip install msal. This procedure assumes that you have set as the Redirect URI for the application registered in Azure AD. Get Azure AD tokens by using the MSAL Python library Be sure to check that the state value matches the one that you provided earlier in this procedure. The Azure AD token is in the access_token value within the result of the call. d 'redirect_uri=http://localhost' \ To help check for the integrity of information exchange, this state value should match the one that is in the response payload later in this procedure.įor example: curl -X POST -H 'Content-Type: application/x-www-form-urlencoded' \ with a random number or some encoded information.This URI must be in URL-encoded (percent-endoded) format. with the registered application’s redirect URI.curl -X POST -H 'Content-Type: application/x-www-form-urlencoded' \ Use the authorization code along with curl to get the Azure AD access token. The full returned URL will look something like this (with the full code field value shortened to 0.ASkAIj.RxgFhSAA here for brevity): Paste the URL as a single line into your web browser and, if prompted, sign in to Azure. It represents the programmatic ID for Azure Databricks ( 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d) along with the default scope ( /.default, URL-encoded as /.default). To help check for the integrity of information exchange, this state value should match the one that is in the returned URL later in this procedure.ĭo not change the value of the scope parameter. This URI must be in URL-encoded (percent-encoded) format. ![]()
0 Comments
Leave a Reply. |