SSO login fails with `failed to get token: oauth2: cannot fetch token: 401 Unauthorized` or `invalid_client`.
IntermediateTroubleshootingRepos, Clusters, Projects & Permissions
Answer
Likely causes → Wrong or rotated client secret, the secret referenced as $oidc.azure.clientSecret does not exist in argocd-secret, or the redirect URI registered at the IdP differs from https://argocd.example.com/auth/callback (or /api/dex/callback for Dex).
Diagnose → kubectl -n argocd logs deploy/argocd-server | grep -i oidc; confirm url: in argocd-cm is the public URL users hit.
Fix → Update the client secret in argocd-secret (or the external secret it references), fix url and the registered redirect URI, then restart argocd-server.
Prevent → Calendar the IdP secret expiry (Azure secrets expire), and sync the secret through External Secrets.
More on Repos, Clusters, Projects & Permissions
Adding a private GitHub repo over HTTPS fails with `rpc error: code = Unknown desc = authentication required`.BeginnerAn SSH repo fails with `ssh: handshake failed: knownhosts: key is unknown`.BeginnerSSH repo: `ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain`.BeginnerA self-hosted GitLab repo fails with `x509: certificate signed by unknown authority`.IntermediateA credential template exists for `https://github.com/org`, yet new repos under the org still fail with `authentication required`.IntermediateSync fails with `application repo https://github.com/org/payments-config.git is not permitted in project 'team-a'`.Beginner