There are three different ways to integrate Argo CD login with your Google Workspace users. Generally the OpenID Connect (oidc) method would be the recommended way of doing this integration (and easier, as well…), but depending on your needs, you may choose a different option.
- OpenID Connect using Dex
This is the recommended login method if you don’t need information about the groups the user’s belongs to. Google doesn’t expose thegroupsclaim via oidc, so you won’t be able to use Google Groups membership information for RBAC. - SAML App Auth using Dex
Dex recommends avoiding this method. Also, you won’t get Google Groups membership information through this method. - OpenID Connect plus Google Groups using Dex
This is the recommended method if you need to user Google Groups membership in your RBAC configuration.
Once you’ve set up one of the above integrations, be sure to edit argo-rbac-cm to configure permissions (as in the example below). See RBAC Configurations for more detailed scenarios.
apiVersion: v1kind: ConfigMapmetadata:name: argocd-rbac-cmnamespace: argocddata:policy.default: role:readonly
OpenID Connect using Dex
Configure your OAuth consent screen
If you’ve never configured this, you’ll be redirected straight to this if you try to create an OAuth Client ID
- Go to your OAuth Consent configuration. If you still haven’t created one, select
InternalorExternaland clickCreate - Go and edit your OAuth consent screen Verify you’re in the correct project!
- Configure a name for your login app and a user support email address
- The app logo and filling the information links is not mandatory, but it’s a nice touch for the login page
- In “Authorized domains” add the domains who are allowed to log in to ArgoCD (e.g. if you add
example.com, all Google Workspace users with an@example.comaddress will be able to log in) - Save to continue to the “Scopes” section
- Click on “Add or remove scopes” and add the
.../auth/userinfo.profileand theopenidscopes - Save, review the summary of your changes and finish
Configure a new OAuth Client ID
- Go to your Google API Credentials console, and make sure you’re in the correct project.
- Click on “+Create Credentials”/“OAuth Client ID”
- Select “Web Application” in the Application Type drop down menu, and enter an identifying name for your app (e.g.
Argo CD) - Fill “Authorized JavaScript origins” with your Argo CD URL, e.g.
https://argocd.example.com Fill “Authorized redirect URIs” with your Argo CD URL plus
/api/dex/callback, e.g.https://argocd.example.com/api/dex/callback
Click “Create” and save your “Client ID” and your “Client Secret” for later
Configure Argo to use OpenID Connect
Edit argocd-cm and add the following dex.config to the data section, replacing clientID and clientSecret with the values you saved before:
data:url: https://argocd.example.comdex.config: |connectors:- config:issuer: https://accounts.google.comclientID: XXXXXXXXXXXXX.apps.googleusercontent.comclientSecret: XXXXXXXXXXXXXtype: oidcid: googlename: Google
References
SAML App Auth using Dex
Configure a new SAML App
Deprecation Warning
Note that, according to Dex documentation, SAML is considered unsafe and they are planning to deprecate that module.
In the Google admin console, open the left-side menu and select
Apps>SAML Apps
Under
Add AppselectAdd custom SAML app
Enter a
Namefor the application (e.g.Argo CD), then chooseContinue
Download the metadata or copy the
SSO URL,Certificate, and optionallyEntity IDfrom the identity provider details for use in the next section. Choosecontinue.- Base64 encode the contents of the certificate file, for example:
$ cat ArgoCD.cer | base64- Keep a copy of the encoded output to be used in the next section.
- Ensure that the certificate is in PEM format before base64 encoding

For both the
ACS URLandEntity ID, use your Argo Dex Callback URL, for example:https://argocd.example.com/api/dex/callback
Add SAML Attribute Mapping, Map
Primary emailtonameandPrimary Emailtoemail. and clickADD MAPPINGbutton.
Finish creating the application.
Configure Argo to use the new Google SAML App
Edit argocd-cm and add the following dex.config to the data section, replacing the caData, argocd.example.com, sso-url, and optionally google-entity-id with your values from the Google SAML App:
data:url: https://argocd.example.comdex.config: |connectors:- type: samlid: samlname: samlconfig:ssoURL: https://sso-url (e.g. https://accounts.google.com/o/saml2/idp?idpid=Abcde0)entityIssuer: https://argocd.example.com/api/dex/callbackcaData: |BASE64-ENCODED-CERTIFICATE-DATAredirectURI: https://argocd.example.com/api/dex/callbackusernameAttr: nameemailAttr: email# optionalssoIssuer: https://google-entity-id (e.g. https://accounts.google.com/o/saml2?idpid=Abcde0)
References
OpenID Connect plus Google Groups using Dex
Limited group information
When using this feature you’ll only receive the list of groups the user is a direct member.
So, lets say you have this hierarchy of groups and subgroups:all@example.com --> tech@example.com --> devs@example.com --> you@example.com
The only group you would receive through Dex would be devs@example.com
We’re going to use Dex’s google connector to get additional Google Groups information from your users, allowing you to use group membership on your RBAC, i.e., giving admin role to the whole sysadmins@yourcompany.com group.
This connector uses two different credentials:
- An oidc client ID and secret
Same as when you’re configuring an OpenID connection, this authenticates your users - A Google service account
This is used to connect to the Google Directory API and pull information about your user’s group membership
Also, you’ll need the email address for an admin user on this domain. Dex will impersonate that user identity to fetch user information from the API.
Configure OpenID Connect
Go through the same steps as in OpenID Connect using Dex, except for configuring argocd-cm. We’ll do that later.
Set up Directory API access
- Follow Google instructions to create a service account with Domain-Wide Delegation
- When assigning API scopes to the service account assign only the
https://www.googleapis.com/auth/admin.directory.group.readonlyscope and nothing else. If you assign any other scopes, you won’t be able to fetch information from the API - Create the credentials in JSON format and store them in a safe place, we’ll need them later
- When assigning API scopes to the service account assign only the
- Enable the Admin SDK
Configure Dex
Create a secret with the contents of the previous json file encoded in base64, like this:
apiVersion: v1kind: Secretmetadata:name: argocd-google-groups-jsonnamespace: argocddata:googleAuth.json: JSON_FILE_BASE64_ENCODED
Edit your
argocd-dex-serverdeployment to mount that secret as a fileAdd a volume mount in
/spec/template/spec/containers/0/volumeMounts/like this. Be aware of editing the running container and not the init container!volumeMounts:- mountPath: /sharedname: static-files- mountPath: /tmpname: dexconfig- mountPath: /tmp/oidcname: google-jsonreadOnly: true
Add a volume in
/spec/template/spec/volumes/like this:volumes:- emptyDir: {}name: static-files- emptyDir: {}name: dexconfig- name: google-jsonsecret:defaultMode: 420secretName: argocd-google-groups-json
Edit
argocd-cmand add the followingdex.configto the data section, replacingclientIDandclientSecretwith the values you saved before,adminEmailwith the address for the admin user you’re going to impersonate, and editingredirectURIwith your Argo CD domain:dex.config: |connectors:- config:redirectURI: https://argocd.example.com/api/dex/callbackclientID: XXXXXXXXXXXXX.apps.googleusercontent.comclientSecret: XXXXXXXXXXXXXserviceAccountFilePath: /tmp/oidc/googleAuth.jsonadminEmail: admin-email@example.comtype: googleid: googlename: Google
Restart your
argocd-dex-serverdeployment to be sure it’s using the latest configurationLogin to Argo CD and go to the “User info” section, were you should see the groups you’re member

- Now you can use groups email addresses to give RBAC permissions