'getting token for Azure ML

I'm quiet new to Azure. I have deployed a model using on Azure ML studio to a webservice which need token to be authenticated. I can get the token using Python SDK. but I need to get the token using postman. for this purpose I register and App in Azure Active Directory to get the access token using it but this token is not a valid token for Azure ML and when I use this token to call my web service it will give "Unauthorized, invalid AAD token specified". Does anyone have any suggestion about this problem?



Solution 1:[1]

As per this official document

When you enable token authentication for a web service, users must present an Azure Machine Learning JSON Web Token to the web service to access it. The token expires after a specified time-frame and needs to be refreshed to continue making calls.

enter image description here

To authenticate with a token, the web service will make a call to the region in which your Azure Machine Learning workspace is created. If your workspace region is unavailable, you won't be able to fetch a token for your web service, even if your cluster is in a different region from your workspace. The result is that Azure AD Authentication is unavailable until your workspace region is available again.

Also, the greater the distance between your cluster's region and your workspace region, the longer it will take to fetch a token.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 UtkarshPal-MT