It appears that you are encountering an error related to Azure Active Directory (AAD) and Google integration when trying to sign in. The error message "AADSTS51004: The user account email does not exist in the Directory code directory. To sign into this application, the account must be added to the directory" indicates that the user account you are trying to log in with is not found in the Azure Active Directory.
This issue might be related to the ImmutableID, which is a key component in identity synchronization processes, especially in scenarios where you are integrating services like Azure AD with third-party identity providers (IdPs) such as Google. Here are some steps you can take to troubleshoot and resolve the issue:
- Verify User Existence in Azure AD: Ensure that the user account you are trying to sign in with actually exists in Azure Active Directory. You can check this via the Azure portal.
- Check User Principal Name (UPN): The UPN of the user in Azure AD should match the email address used in Google. Any discrepancy here can cause authentication issues.
- ImmutableID: If you are synchronizing identities from an on-premises Active Directory using Azure AD Connect, make sure that the ImmutableID in Azure AD matches the
objectGUID
of the user in the on-premises AD. If the user is cloud-only, the ImmutableID may not be required. - Synchronization Issues: If you are using directory synchronization, make sure that it is functioning correctly and that recent changes (like new user accounts or updates to existing accounts) have been synchronized to Azure AD.
- Review the Configuration: Double-check the configuration steps outlined in the guide you followed (Configure Azure AD and Google Federation). Ensure that all steps have been completed correctly, including setting up federation and assigning users.
- Check Azure AD Connect Health: If you are using Azure AD Connect, check its health and synchronization status to ensure there are no underlying issues with synchronization.
- Logs and Diagnostics: Review the Azure AD sign-in logs for any additional clues or error messages that could help in diagnosing the problem.
- Consult Azure Support: If the issue persists, consider opening a support ticket with Azure Support for more direct assistance.
It's important to ensure that the user accounts and their attributes are properly managed and synchronized between Azure AD and any external identity providers or directories. Any mismatch or misconfiguration can lead to authentication issues like the one you're experiencing.
Accept the answer if the information helped you. This will help us and others in the community as well.