<PackageReference Include="Microsoft.Identity.Client" Version="4.85.2" />

Microsoft.Identity.Client.ManagedIdentity.ManagedIdentityDiscoveryResult

Internal result of managed identity source discovery. Carries the public-facing source plus internal-only routing details (such as the detected IMDS protocol version) that are not exposed on the public ManagedIdentityCapabilities surface.

The IMDS protocol version detected, when Source is Imds; otherwise null. Internal routing only.

public string ImdsV1FailureReason { get; }

Failure reason from the IMDSv1 probe, if it failed; otherwise null.

public string ImdsV2FailureReason { get; }

Failure reason from the IMDSv2 probe, if it failed; otherwise null.

The highest binding strength the host can produce.

public ManagedIdentitySource Source { get; }

The detected managed identity source. The IMDS v1/v2 distinction is folded into Imds; the version is carried separately in DetectedImdsVersion for internal routing.

public ManagedIdentityDiscoveryResult(ManagedIdentitySource source, ImdsVersion? detectedImdsVersion = default, MtlsBindingStrength maxSupportedBindingStrength = 0, string imdsV1FailureReason = null, string imdsV2FailureReason = null)

public string GetCombinedErrorReason()

Builds a single, combined error reason from the IMDS probe failures, or null when neither probe reported a failure.