You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// IMDS constants. Docs for IMDS are available here https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/how-to-use-vm-token#get-a-token-using-http
requestContext.Logger.Info("[Managed Identity] IMDSv2 flow is not supported on .NET Framework 4.6.2. Cryptographic operations required for managed identity authentication are unavailable on this platform. Skipping IMDSv2 probe.");
requestContext.Logger.Info(()=>$"[Managed Identity] {imdsStringHelper} managed identity is available.");
316
-
returntrue;
317
-
}
318
-
else
319
-
{
320
-
requestContext.Logger.Info(()=>$"[Managed Identity] {imdsStringHelper} managed identity is not available. Status code: {response.StatusCode}, Body: {response.Body}");
requestContext.Logger.Info("[Managed Identity] ImdsV2 detected, but mTLS PoP was not requested. Falling back to ImdsV1 for this request only. Please use the \"WithMtlsProofOfPossession\" API to request a token via ImdsV2.");
76
75
// Do NOT modify s_sourceName; keep cached ImdsV2 so future PoP
77
76
// requests can leverage it.
78
-
source=ManagedIdentitySource.Imds;
77
+
source=ManagedIdentitySource.DefaultToImds;
79
78
}
80
79
81
80
// If the source is determined to be ImdsV1 and mTLS PoP was requested,
82
81
// throw an exception since ImdsV1 does not support mTLS PoP
Copy file name to clipboardExpand all lines: src/client/Microsoft.Identity.Client/ManagedIdentity/ManagedIdentitySource.cs
-1Lines changed: 0 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,6 @@ public enum ManagedIdentitySource
48
48
/// Indicates that the source is defaulted to IMDS since no environment variables are set.
49
49
/// This is used to detect the managed identity source.
50
50
/// </summary>
51
-
[Obsolete("In use only to support the now obsolete GetManagedIdentitySource API. Will be removed in a future version. Use GetManagedIdentitySourceAsync instead.")]
0 commit comments