Skip to content

Commit e2e47f2

Browse files
committed
Improve error message when logging in with Microsoft Account and using the Credential parameter
1 parent b833d86 commit e2e47f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Common/Commands.Common.Authentication/Authentication/UserTokenProvider.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ private AuthenticationResult SafeAquireToken(
189189

190190
ex = new AadAuthenticationFailedWithoutPopupException(message, adalEx);
191191
}
192-
else if (adalEx.ErrorCode == AdalError.MissingFederationMetadataUrl)
192+
else if (adalEx.ErrorCode == AdalError.MissingFederationMetadataUrl ||
193+
adalEx.ErrorCode == AdalError.FederatedServiceReturnedError)
193194
{
194195
ex = new AadAuthenticationFailedException(Resources.CredentialOrganizationIdMessage, adalEx);
195196
}

0 commit comments

Comments
 (0)