Argo CD Login: Admin Password, CLI Access and SSO
Argo CD login is the first hurdle after installation: you need a way to reach the API server, the initial admin password, and a working CLI session. This guide covers every login path in order. You will sign in to the web UI with the built-in admin account, log in from the argocd CLI, create local accounts and API tokens for automation, connect single sign-on through Dex or OIDC, and fix the login errors people run into most often.
It assumes Argo CD is already installed in the argocd namespace. If not, start with the Argo CD installation guide.
Step 1: Reach the Argo CD API server
The UI and the CLI both talk to the argocd-server service. By default it is not exposed outside the cluster, so pick one of three options:
- Port-forward for testing and local clusters. Nothing changes in the cluster.
- LoadBalancer service if your cluster provisions external load balancers.
- Ingress with a real hostname and TLS certificate for anything shared with a team.
# Option 1: port-forward, then browse to https://localhost:8080
kubectl port-forward svc/argocd-server -n argocd 8080:443
# Option 2: expose the service through a cloud load balancer
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
Keep the port-forward running in its own terminal while you work through the rest of this guide.
Step 2: Get the initial admin password
The built-in user is admin. There is no fixed default password; Argo CD generates a random one during installation and stores it in a Secret named argocd-initial-admin-secret. The easiest way to read it is with the CLI:
argocd admin initial-password -n argocd
Without the CLI, decode the Secret with kubectl. On Linux or macOS:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
On Windows PowerShell, where base64 is not available:
$b64 = kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}"
[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($b64))
If your shell prints a trailing % after the password, that is zsh marking a missing newline, not part of the password.
Step 3: Sign in to the web UI
Open the address from step 1, for example https://localhost:8080. With a port-forward or a fresh install, the browser warns about a self-signed certificate; accept it for testing only. Enter admin and the password from step 2. You should land on the Applications page, which is empty on a new install. From here the Argo CD tutorial shows how to create your first application.
Step 4: Argo CD login from the CLI
Install the CLI first if you have not (on macOS or Linux, brew install argocd works; other options are in the Argo CD download guide). Then log in against the same address:
argocd login localhost:8080 --username admin --insecure
argocd account get-user-info
argocd login prompts for the password if you leave out --password, which keeps it out of your shell history. The session is stored as a context in your local CLI config, so you can work with several Argo CD instances side by side:
argocd context # list contexts, current one marked
argocd context prod-argocd # switch context
argocd relogin # refresh an expired session
argocd logout localhost:8080 # remove the stored token
Useful argocd login flags
| Flag | When to use it |
|---|---|
--insecure | Skip TLS verification, for self-signed certificates and port-forwards |
--grpc-web | The server sits behind an ingress or proxy that does not pass gRPC |
--plaintext | The server runs without TLS (for example server.insecure behind a TLS-terminating ingress reached internally) |
--sso | Log in through the configured SSO provider in your browser |
--username / --password | Non-interactive local account login |
--name | Give the stored context a friendly name |
--core | Skip the API server and use your kubeconfig directly (core mode) |
Step 5: Change the admin password and remove the initial secret
Change the generated password straight away:
argocd account update-password
kubectl -n argocd delete secret argocd-initial-admin-secret
The initial secret exists only to hand you the first password. Argo CD stores the real admin password as a bcrypt hash in argocd-secret and never reads the initial secret again, so deleting it does not change your password. Store the new password in your team's password manager before you delete anything.
Local accounts and API tokens
Sharing the admin account does not scale and leaves no useful audit trail. Argo CD can define extra local accounts in the argocd-cm ConfigMap. The login capability allows UI and CLI sign-in; apiKey allows generating tokens for automation:
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
namespace: argocd
data:
accounts.alice: login
accounts.ci-bot: apiKey
Set a password for the human account and generate a token for the CI account:
argocd account list
argocd account update-password --account alice --current-password <admin-password> --new-password <new-password>
argocd account generate-token --account ci-bot
Pipelines can then use the token without an interactive login by setting environment variables:
export ARGOCD_SERVER=argocd.example.com
export ARGOCD_AUTH_TOKEN=<token>
argocd app sync my-app --grpc-web
New accounts have no permissions beyond the default role, so grant them access in argocd-rbac-cm, for example p, ci-bot, applications, sync, default/*, allow.
Single sign-on with Dex or OIDC
For teams, SSO is the better long-term login method. Argo CD can use its bundled Dex server, which supports GitHub, GitLab, LDAP, SAML, Microsoft and generic OIDC connectors, or talk directly to an OIDC provider such as Okta or Keycloak. Either way, argocd-cm needs the external URL users reach Argo CD on, because redirects are built from it.
Dex with GitHub
Create an OAuth app in GitHub with the callback URL https://argocd.example.com/api/dex/callback, store its client secret in argocd-secret under the key dex.github.clientSecret, then add:
data:
url: https://argocd.example.com
dex.config: |
connectors:
- type: github
id: github
name: GitHub
config:
clientID: <client-id>
clientSecret: $dex.github.clientSecret
orgs:
- name: my-org
Direct OIDC
If you already run an identity provider, skip Dex and configure OIDC directly:
data:
url: https://argocd.example.com
oidc.config: |
name: Okta
issuer: https://example.okta.com
clientID: <client-id>
clientSecret: $oidc.okta.clientSecret
requestedScopes: ["openid", "profile", "email", "groups"]
Map groups to roles
SSO decides who you are; RBAC decides what you can do. In argocd-rbac-cm, set a safe default and map groups or teams to roles:
data:
policy.default: role:readonly
policy.csv: |
g, my-org:platform-team, role:admin
Users then sign in with the SSO button in the UI or with argocd login argocd.example.com --sso, which opens a browser window for the provider. Repository connections and GitHub or GitLab specific SSO details are covered in our Argo CD with GitHub and GitLab guide. Once SSO and an admin-level group work, you can switch off the local admin by setting admin.enabled: "false" in argocd-cm.
Fix common login problems
argocd-initial-admin-secret not found
Someone already deleted it, usually after changing the password, which is the intended workflow. If nobody knows the current password, reset it as shown below.
Forgotten admin password
Generate a bcrypt hash and patch it into argocd-secret with an updated timestamp, which also invalidates existing admin sessions:
argocd account bcrypt --password '<new-password>'
kubectl -n argocd patch secret argocd-secret \
-p '{"stringData": {"admin.password": "<bcrypt-hash>", "admin.passwordMtime": "'$(date +%FT%T%Z)'"}}'
CLI hangs or reports transport errors
The CLI speaks gRPC by default. If the server sits behind an ingress or proxy that does not pass gRPC, add --grpc-web or configure the ingress for gRPC. Certificate errors with a self-signed certificate go away with --insecure, but fix the certificate rather than relying on that flag in production.
SSO redirect fails or loops
Check that url in argocd-cm exactly matches the address in the browser, including https, and that the callback URL registered with the provider matches. Then read the logs:
kubectl logs -n argocd deploy/argocd-server
kubectl logs -n argocd deploy/argocd-dex-server
More fixes are in the Argo CD troubleshooting guide.
Frequently asked questions
What is the default Argo CD login username and password?
The username is admin. There is no fixed default password: a random one is generated at install time and stored in the argocd-initial-admin-secret Secret. Read it with argocd admin initial-password -n argocd.
How do I reset the Argo CD admin password?
Generate a bcrypt hash with argocd account bcrypt, patch it into the admin.password key of the argocd-secret Secret together with a new admin.passwordMtime value, then log in with the new password.
Why does argocd login fail behind an ingress?
Many ingress controllers and proxies do not pass the gRPC traffic the CLI uses by default. Add --grpc-web to the login command or configure the ingress for gRPC, and use --insecure only when testing with a self-signed certificate.
Can I disable the Argo CD admin account?
Yes. Once SSO or a local account with admin rights works, set admin.enabled to "false" in the argocd-cm ConfigMap. Keep a tested way back in, such as the argocd admin commands with cluster access, before you do.
Next steps
With login working, deploy something real using the Argo CD tutorial, or connect your repositories and SSO provider with the GitHub and GitLab guide. The homepage FAQ answers common setup questions, and the official documentation covers every RBAC and SSO option in depth.
Hand over access without sharing a session
A useful access handover records the server hostname, the approved sign-in method, the responsible platform team and the procedure for requesting a role. Leave passwords, bearer tokens and personal CLI configuration out of that document. Each engineer should establish their own session so that account removal and access review remain manageable.
After signing in, check the account identity and confirm access to the intended project before making changes. Seeing an application is not the same as having permission to synchronize it. Test the smallest read-only action first, then request a narrowly scoped role if a required operation is denied. Keep separate contexts for test and production servers to reduce accidental changes.