diff --git a/apps/console/src/pages/iam/organizations/settings/_components/GoogleWorkspaceConnector.tsx b/apps/console/src/pages/iam/organizations/settings/_components/GoogleWorkspaceConnector.tsx
index b9982d242..08cefcf5b 100644
--- a/apps/console/src/pages/iam/organizations/settings/_components/GoogleWorkspaceConnector.tsx
+++ b/apps/console/src/pages/iam/organizations/settings/_components/GoogleWorkspaceConnector.tsx
@@ -135,7 +135,7 @@ export function GoogleWorkspaceConnector(props: {
}
toast({
title: __("Success"),
- description: __("Google Workspace disconnected successfully"),
+ description: __("Google Workspace / Cloud Identity disconnected successfully"),
variant: "success",
});
dialogRef.current?.close();
@@ -208,10 +208,10 @@ export function GoogleWorkspaceConnector(props: {
{__( - "Connect Google Workspace to automatically sync users via SCIM.", + "Connect Google Workspace or Google Cloud Identity to automatically sync users via SCIM.", )}
{sprintf(__("Connected on %s"), dateTimeFormat(connector.createdAt))}
@@ -245,7 +245,7 @@ export function GoogleWorkspaceConnector(props: { {__("Settings")} )} - title={__("Google Workspace Settings")} + title={__("Google Workspace / Cloud Identity Settings")} className="max-w-lg" >- {__("Users with these user names will not be synced from Google Workspace.")} + {__("Users with these user names will not be synced from Google Workspace / Cloud Identity.")}
- {__("No excluded user names. All Google Workspace users will be synced.")} + {__("No excluded user names. All Google Workspace / Cloud Identity users will be synced.")}
)}{__( - "This will disconnect your Google Workspace integration. Users will no longer be automatically synced via SCIM.", + "This will disconnect your Google Workspace / Cloud Identity integration. Users will no longer be automatically synced via SCIM.", )}
diff --git a/pkg/iam/scim/bridge/provider/googleworkspace/oauth2_scopes.go b/pkg/iam/scim/bridge/provider/googleworkspace/oauth2_scopes.go index 692486129..6b1d913c5 100644 --- a/pkg/iam/scim/bridge/provider/googleworkspace/oauth2_scopes.go +++ b/pkg/iam/scim/bridge/provider/googleworkspace/oauth2_scopes.go @@ -15,13 +15,16 @@ package googleworkspace var ( - // OAuth2Scopes are the Google Workspace OAuth2 scopes required by the - // SCIM provisioning bridge. The bridge reads users, user schemas, group - // members, and customer info from the Admin Directory API. + // OAuth2Scopes are the OAuth2 scopes required by the SCIM provisioning + // bridge to read users from the Admin Directory API. The scopes are + // intentionally limited to what the bridge actually consumes so the + // integration also works for Google Cloud Identity (Free or Premium) + // customers, not only Google Workspace customers. In particular, + // admin.directory.userschema is a Workspace-only entitlement (custom + // user fields are not available on Cloud Identity) and must not be + // requested here, otherwise Cloud Identity-only admins cannot complete + // the OAuth consent flow. OAuth2Scopes = []string{ "https://www.googleapis.com/auth/admin.directory.user.readonly", - "https://www.googleapis.com/auth/admin.directory.userschema.readonly", - "https://www.googleapis.com/auth/admin.directory.group.member.readonly", - "https://www.googleapis.com/auth/admin.directory.customer.readonly", } ) diff --git a/pkg/iam/scim/bridge/provider/googleworkspace/provider.go b/pkg/iam/scim/bridge/provider/googleworkspace/provider.go index 283cb99e0..81b4acee5 100644 --- a/pkg/iam/scim/bridge/provider/googleworkspace/provider.go +++ b/pkg/iam/scim/bridge/provider/googleworkspace/provider.go @@ -68,7 +68,11 @@ func (p *Provider) ListUsers(ctx context.Context) (scimclient.Users, error) { pageToken := "" for { - call := adminService.Users.List().Customer("my_customer").MaxResults(500).Context(ctx) + call := adminService.Users.List(). + Customer("my_customer"). + MaxResults(500). + Projection("full"). + Context(ctx) if pageToken != "" { call = call.PageToken(pageToken) }