azure.ai.ml.identity package¶
Contains Identity Configuration for Azure Machine Learning SDKv2.
The credential did not attempt to authenticate because required data or state is unavailable.
Exception.add_note(note) – add a note to the exception
Raise the exception with the existing traceback.
Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- class azure.ai.ml.identity.AzureMLOnBehalfOfCredential(**kwargs: Any)[source]¶
Authenticates a user via the on-behalf-of flow.
This credential can only be used on Azure Machine Learning Compute or Azure Machine Learning Serverless Spark Compute during job execution when user request to run job using its identity.
- get_token(*scopes: str, **kwargs: Any) AccessToken[source]¶
Request an access token for scopes.
This method is called automatically by Azure SDK clients.
- Parameters:
scopes (str) – desired scope for the access token. This credential allows only one scope per request.
- Return type:
- Returns:
AzureML On behalf of credentials isn’t available in the hosting environment
- Raises:
~azure.ai.ml.identity.CredentialUnavailableError