Prior to the migration of IMDS logic migration from Azure.Identity, when the IMDS endpoint returned invalid json, the exception thrown was distinguishable from other general failures such that it could be treated as if the IMDS endpoint was unavailable.
In the MSAL implementation of ImdsManagedIdentitySource.HandleResponseAsync the MsalError.ManagedIdentityRequestFailed error code is thrown unconditionally.
In the Azure.Identity implementation, when the response from IMDS cannot be parsed as valid json, a distinct exception is thrown so that we can handle it appropriately.
In the case of MSAL, perhaps a distinct MsalError could be used so that Azure.Identity could handle this in the same way as before to prevent the regression.