How do I fix AADSTS errors for federated users in AAD/Google Workspace federation?

COFZ 40 Reputation points
2023-08-07T18:02:53.16+00:00

I recently accomplished configuring SSO using Google Workspace as identity provider for AAD and I encountered this: when signing in to AAD using Google Workspace credentials I get this error message only for some federated users: AADSTS51004: The user account someone@domain does not exist in the xxx-xxxxxx directory. To sign into this application, the account must be added to the directory.

I created an account in GW and tried signing in to OneDrive and other Microsoft services (My Account, M365, etc.) and the sign in worked. However, the account that I previously used on my computer encountered a number of AADSTS errors depending on the service being signed into. Other GW accounts that I've used before (on the same computer) experienced the same.

I tried to sign in with GW accounts that I've not used before on my computer. They all worked.

The sign in worked for those accounts created before federation as well as for those after - as long as I have not used them before on my computer (or other computers they've signed in before SSO).

Prior to SSO, I manually created accounts on our AAD using GW email as AAD principal name. Each account in AAD and GW had the same email address but may have different passwords.

Is this problem related to Windows or is it singularly an AAD issue?

Active Directory Federation Services
Active Directory Federation Services
An Active Directory technology that provides single-sign-on functionality by securely sharing digital identity and entitlement rights across security and enterprise boundaries.
1,208 questions
Microsoft Entra Internet Access
Microsoft Entra Internet Access
A Microsoft Entra service that provides an identity-centric Secure Web Gateway that protects access to internet, software as a service (SaaS), and Microsoft 365 apps and resources.
13 questions
Microsoft Entra
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,799 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vahid Ghafarpour 18,765 Reputation points
    2023-08-07T18:30:50.1833333+00:00

    Ensure that the tokens exchanged during SSO are correctly signed and validated by both Google Workspace and Azure AD. Token signing issues can lead to authentication failures.


0 additional answers

Sort by: Most helpful