AzureAD / microsoft-authentication-library-for-java

Microsoft Authentication Library (MSAL) for Java http://aka.ms/aadv2
MIT License
288 stars 145 forks source link

[Bug] Managed Identity App should not throw when User Assigned MI is specified for Azure Cloud shell, Arc and Service Fabric platforms. #770

Closed g2vinay closed 8 months ago

g2vinay commented 10 months ago

Library version used

14.4.2-beta

Java version

JDK 17

Scenario

ManagedIdentityClient - managed identity

Is this a new or an existing app?

None

Issue description and reproduction steps

Context

Currently, Msal throws exceptions in client/resouce id is specified when running against Azure Arc, cloud shell or Service Fabric. We should not throw exceptions, rather log a warning message similar to Azure Identity SDK except Service Fabric as they now support User Assigned MI.  

Reasoning

Throwing Exceptions in this case ties the SDK behavior to service impl details which can break in future when these services support User Assigned MI.

Relevant code snippets

No response

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

Avery-Dunn commented 10 months ago

Confirmed in other discussions that an exception should still be thrown for Azure Arc.

Avery-Dunn commented 8 months ago

Behavior fixed in msal4j 1.15.0