After configuring Microsoft Entra ID Authentication users may receive an "Access denied. Unable to authenticate the user." error when attempting to authenticate using Microsoft Entra ID (formerly Azure AD). You may still be able to configure permissions on vCenter for the affected users despite the log in failure.
Symptoms:
You find a similar error in the federation-service.log
/var/log/vmware/vc-ws1a-broker/federation-service.log
YYYY-MM-DDTHH:MM:SS INFO vcenter.yourdomain.com:federation (federation-business-pool-0) [CUSTOMER;-;IP.XX.XX.XX;XXXXXXXX-TASK-UUID-XXXXXXXXXXXX;-;XXXXXXXX-USER-LOGIN-UUID-XXXXXXXXXXXX] com.vmware.vidm.federation.utils.MetricsPublisherUtil - OIDC authentication successful
YYYY-MM-DDTHH:MM:SS INFO vcenter.yourdomain.com:federation (federation-business-pool-0) [CUSTOMER;-;IP.XX.XX.XX;XXXXXXXX-TASK-UUID-XXXXXXXXXXXX;-;XXXXXXXX-USER-LOGIN-UUID-XXXXXXXXXXXX] com.vmware.vidm.federation.login.processor.AuthResponseUserResolver - Fetching user for jit login context: XXXXXXXX-USER-LOGIN-UUID-XXXXXXXXXXXX on attribute ExternalId=XXXXXXXX-EXTERNALID-XXXX-XXXXXXXXXXXX, domains: [yourdomain.com]
YYYY-MM-DDTHH:MM:SS WARN vcenter.yourdomain.com:federation (ForkJoinPool-2-worker-145) [CUSTOMER;-;IP.XX.XX.XX;XXXXXXXX-TASK-UUID-XXXXXXXXXXXX;-;XXXXXXXX-USER-LOGIN-UUID-XXXXXXXXXXXX] com.vmware.vidm.federation.login.processor.AuthResponseUserResolver - User fetching exception with nameId XXXXXXXX-EXTERNALID-XXXX-XXXXXXXXXXXX, nameIdFormat ExternalId, and domains [yourdomain.com], user not found
YYYY-MM-DDTHH:MM:SS INFO vcenter.yourdomain.com:federation (federation-business-pool-0) [CUSTOMER;-;IP.XX.XX.XX;XXXXXXXX-TASK-UUID-XXXXXXXXXXXX;-;XXXXXXXX-USER-LOGIN-UUID-XXXXXXXXXXXX] com.vmware.vidm.federation.login.LoginEventServiceAspect - Failing login. contextUuid: XXXXXXXX-USER-LOGIN-UUID-XXXXXXXXXXXX, exception: com.vmware.vidm.federation.login.AccessDeniedException: Access denied with reason code: USER_NOT_FOUND, isAuthenticationForced: false
YYYY-MM-DDTHH:MM:SS INFO vcenter.yourdomain.com:federation (federation-business-pool-0) [CUSTOMER;-;IP.XX.XX.XX;XXXXXXXX-TASK-UUID-XXXXXXXXXXXX;-;XXXXXXXX-USER-LOGIN-UUID-XXXXXXXXXXXX] com.vmware.vidm.federation.utils.MetricsPublisherUtil - Login failed due to reason: USER_NOT_FOUND
When Enabling Entra ID for vCenter Server the SCIM User attributes may be synced prior to them being mapped correctly.
We need to clear the Entra ID configuration, and re-add it to allow the authentication of the users.