From 73434ebfdef70c790dcc2a55127d181b268f5352 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 5 Feb 2026 21:39:31 +0000 Subject: [PATCH 1/2] Initial plan From 432a3574a97fdc8ef2c66e7a729a69cfa81335f1 Mon Sep 17 00:00:00 2001 From: James May Date: Wed, 4 Feb 2026 12:01:47 +1100 Subject: [PATCH 2/2] Fix fallback where OpenTelemetry instrumentation is not available Follow up to https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/pull/4487 --- .../PlatformsCommon/Shared/AbstractPlatformProxy.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/client/Microsoft.Identity.Client/PlatformsCommon/Shared/AbstractPlatformProxy.cs b/src/client/Microsoft.Identity.Client/PlatformsCommon/Shared/AbstractPlatformProxy.cs index d6a2b488a2..c906c336de 100644 --- a/src/client/Microsoft.Identity.Client/PlatformsCommon/Shared/AbstractPlatformProxy.cs +++ b/src/client/Microsoft.Identity.Client/PlatformsCommon/Shared/AbstractPlatformProxy.cs @@ -61,7 +61,11 @@ private IOtelInstrumentation InternalGetOtelInstrumentation() try { return new OtelInstrumentation(); - } catch (FileNotFoundException ex) + } + catch (Exception ex) + when (ex is FileNotFoundException + or TypeLoadException + or TypeInitializationException) { // Can happen in in-process Azure Functions: https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/4456 Logger.Warning("Failed instantiating OpenTelemetry instrumentation. Exception: " + ex.Message); @@ -247,3 +251,4 @@ internal virtual IManagedIdentityKeyProvider GetManagedIdentityKeyProvider() public IManagedIdentityKeyProvider ManagedIdentityKeyProvider => _miKeyProvider.Value; } } +