Skip to content

Commit c8e16f8

Browse files
committed
google: Document for service account-less access
Signed-off-by: Manatsawin Hanmongkolchai <[email protected]>
1 parent a8d5b3e commit c8e16f8

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

content/docs/connectors/google.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,31 @@ connectors:
5454
```
5555

5656
## Fetching groups from Google
57-
To allow Dex to fetch group information from Google, you will need to configure a service account for Dex to use.
58-
This account needs Domain-Wide Delegation and permission to access the `https://www.googleapis.com/auth/admin.directory.group.readonly` API scope.
57+
To allow Dex to fetch group information from Google, you must configure a method to retrieve group information
5958

60-
To get group fetching set up:
59+
### Accessing group information from the user directly
60+
This method is only available to Google Workspace Enterprise Standard, Enterprise Plus, Enterprise for Education, and Cloud Identity Premium accounts
61+
62+
You'll need the `https://www.googleapis.com/auth/cloud-identity.groups.readonly` scope:
63+
64+
```yaml
65+
connectors:
66+
- type: google
67+
id: google
68+
name: Google
69+
config:
70+
# ...
71+
scopes:
72+
# These are default and required
73+
- profile
74+
- email
75+
- https://www.googleapis.com/auth/cloud-identity.groups.readonly
76+
```
77+
78+
The project that owns the OAuth client ID must also have [Cloud Identity API](https://console.developers.google.com/apis/library/cloudidentity.googleapis.com) enabled. Also, [non-Google Groups](https://cloud.google.com/identity/docs/groups#group_types) will not show up in groups.
79+
80+
### Using domain-wide delegation and a service account
81+
This method requires setting up domain-wide delegation to a Google service account.
6182
6283
1. Follow the [instructions](https://developers.google.com/admin-sdk/directory/v1/guides/delegation) to set up a service account with Domain-Wide Delegation
6384
- During service account creation, a JSON key file will be created that contains authentication information for the service account. This needs storing in a location accessible by Dex and you will set the `serviceAccountFilePath` to point at it.

0 commit comments

Comments
 (0)