Skip to content

[Bug] IMDS v2 fails to detect source correctly when identity not found #5565

@gladjohn

Description

@gladjohn

Library version used

msal mTLS pop preview

Issue Description:

During Managed Identity source detection, MSAL sends the initial platform-metadata GET (cred-api-version=2.0) with a client_id selector for UAMI. If that UAMI isn’t assigned to the VM, IMDS returns “Identity not assigned to VM.” MSAL misclassifies this as “IMDSv2 not available,” exits the IMDSv2 path, and throws MsalClientException.

Expected behavior

should detect MSI v2 source when available.

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

No response

Solution and workarounds

Fix: Reclassify this as a UAMI configuration error rather than endpoint unavailability.

Metadata

Metadata

Type

Projects

Status

Committed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions