AzureAD / microsoft-authentication-library-common-for-android

Common code used by both the Active Directory Authentication Library (ADAL) and the Microsoft Authentication Library (MSAL)
MIT License
41 stars 35 forks source link

Fixing generateSHR command controller logic #2356

Closed somalaya closed 7 months ago

somalaya commented 7 months ago

Issue : AT PoP generate SHR tests are failing in the daily pipeline

Cause : In this PR, we changed the order of the controller - https://github.com/AzureAD/microsoft-authentication-library-for-android/pull/2040. We are first adding BrokerMsalController if broker is installed. After this change, GenerateSHRCommand was first trying to generateSHR with BrokerMsalController and it would succeed. But the result is not returned. It would then try with LocalMsalController and fails because the account is added to broker. This is an existing bug which got surfaced with recent changes.

Fix : Return from GenerateSHRCommand with the result if a controller returns a successful response.