Login with Pinniped to Active Directory fails for only 1 user account. All other users are able to successfully login using the same kubeconfig file:
Steps to reproduce:
Run any kubectl command using a kubeconfig: kubectl get ns -n --kubeconfig=<creds file>
Link for token is generated.
Paste link into browser.
Provide credentials.
Log into windows server successfully.
Token is generated.
Enter token into terminal.
Error message is generated.
Error:
Error: could not complete Pinniped login: error handling callback: oauth2: cannot fetch token: 400 Bad Request
Response: {"error":"invalid_grant","error_description":"The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client."}
Error: pinniped-auth login failed: exit status 1
Environment
VMware Tanzu Kubernetes Grid 2.3+
Cause
The cause should be investigated in Active Directory.