Skip to content

[Bug] GetSourceAsync caches the wrong IMDS source #6024

@bgavrilMS

Description

@bgavrilMS

Library version used

4.84.0

.NET version

all

Scenario

ManagedIdentityClient - managed identity

Is this a new or an existing app?

None

Issue description and reproduction steps

If Azure SDK calls GetManagedIdentitySourceAsync it always detects V1 and caches it in that static value, and so it will always fail token binding. If you don't call that, it works because that value is not cached.

Proposal: simplify to return IMDS. probe only IMDSv1, assume IMDSv2 infrastructure is always there.

Relevant code snippets

Expected behavior

No response

Identity provider

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

Regression

No response

Solution and workarounds

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions