KEMBAR78
Fix document for using `SystemAssigned` managed identity by jiasli · Pull Request #764 · AzureAD/microsoft-authentication-library-for-python · GitHub
Skip to content

Conversation

@jiasli
Copy link
Contributor

@jiasli jiasli commented Nov 1, 2024

No description provided.

@jiasli jiasli requested a review from a team as a code owner November 1, 2024 10:04
to store a json blob like
``{"ManagedIdentityIdType": "ClientId", "Id": "foo"}`` or
``{"ManagedIdentityIdType": "SystemAssignedManagedIdentity", "Id": null})``.
``{"ManagedIdentityIdType": "SystemAssigned", "Id": null}``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The detection logic is to compare ManagedIdentityIdType's value with "SystemAssigned":

and unknown.get(cls.ID_TYPE) == cls.SYSTEM_ASSIGNED)

Using "SystemAssignedManagedIdentity" will trigger error:

raise ManagedIdentityError(
f"Incorrect managed_identity: {managed_identity}")

you may use an environment variable (such as MY_MANAGED_IDENTITY_CONFIG)
to store a json blob like
``{"ManagedIdentityIdType": "ClientId", "Id": "foo"}`` or
``{"ManagedIdentityIdType": "SystemAssignedManagedIdentity", "Id": null})``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ) symbol is not needed.

@rayluo rayluo merged commit 1d85e8a into AzureAD:dev Nov 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants