HTTP 400 Bad Request error/var/log/vmware/sso/tokenservice.log
yyyy-mm-ddThh:mm:ss.zzz WARNING vmidentity-tokenservice 55 [vc@4413 threadName="tomcat-http--14" logger="com.vmware.vcenter.tokenservice.verifiers.Ws1VerifiableJwtToken" corId="<corId>" opId="<opId>"] Encountered group name in token claim group_names with non-UPN format: NETBIOS_DOMAIN\sAMAccountName@<DOMAIN>
yyyy-mm-ddThh:mm:ss.zzz ERROR vmidentity-tokenservice 55 [vc@4413 threadName="tomcat-http--14" logger="com.vmware.vcenter.tokenservice.vapi.TokenExchangeProviderImpl" corId="<corId>"] Exchange failed due to invalid grant:
com.vmware.vcenter.tokenservice.exceptions.InvalidGrant: Token groups claim 'group_names' contains a group with an invalid UPN format: NETBIOS_DOMAIN\sAMAccountName@<DOMAIN> /var/log/vmware/sso/tokenservice.log
yyyy-mm-ddThh:mm:ss.zzz WARNING vmidentity-tokenservice 55 [vc@4413 threadName="tomcat-http--14" logger="com.vmware.vcenter.tokenservice.verifiers.Ws1VerifiableJwtToken" corId="<corId>" opId="<opId>"] Encountered group name in token claim group_names with non-UPN format: NETBIOS_DOMAIN\sAMAccountName@<DOMAIN>
yyyy-mm-ddThh:mm:ss.zzz ERROR vmidentity-tokenservice 55 [vc@4413 threadName="tomcat-http--14" logger="com.vmware.vcenter.tokenservice.vapi.TokenExchangeProviderImpl" corId="<corId>"] Exchange failed due to invalid grant:
com.vmware.vcenter.tokenservice.exceptions.InvalidGrant: Token groups claim 'group_names' contains a group with an invalid UPN format: NETBIOS_DOMAIN\sAMAccountName@<DOMAIN>VCF 9.1.x
vCenter Server 9.1.x
In Microsoft Entra ID configuration the group name is in UPN format.
When we configure the attribute mappings for groups, we need to configure it to emit groups name and not UPN.
Steps to resolve the issue:
Re-register the group
Remove the existing VCF role assignments for <DOMAIN>\<GROUP_NAME> in VCF Operations
Log in via SSO for a user who is a member of this group. VIDB provisioning will create a new group record named <GROUP_NAME> (without prefix)
Then, Add the same roles to <GROUP_NAME> (the newly provisioned clean group)