Google Workspace Groups
Overview
When users sign in to BlueFletch Launcher with Google Sign-In, the sign-in token from Google identifies the user but does not include their Google Workspace groups or department. With this feature enabled, BlueFletch looks up the signed-in user's department and group memberships from your Google Workspace directory right after sign-in and adds them to the user's session. You can then use them in group_inclusion to control which apps and layouts each user sees.
The lookup is done by a BlueFletch directory service that you authorize in your Google Admin Console with domain-wide delegation, using read-only access. Devices never hold any Google admin credentials.
What BlueFletch can and can't access
Read-only. BlueFletch only requests the two read-only Directory scopes listed below. It cannot create, change, or delete users or groups.
Only the signed-in user. Each lookup returns data for the user who just signed in on the device, verified from their Google sign-in token. There is no way to request another user's data.
Only department and groups. BlueFletch reads the user's department (from their organization info) and the email addresses of the groups they belong to. Results are held in memory for up to a few hours to reduce calls to Google, and are not stored anywhere else.
You stay in control. Removing the delegation grant in your Admin Console stops all access immediately.
Prerequisites
Google Sign-In is already configured for BlueFletch Launcher (
appConfig.bfAuth.googlewith the Launcher applications'clientId).A BlueFletch Auth release that supports Workspace groups and department (contact BlueFletch for the minimum version).
A Google Workspace super admin to complete the Admin Console steps.
Setup Overview
In Google Admin Console:
Authorize BlueFletch's service account with domain-wide delegation
Create a custom read-only role (only allow Users.Read and Groups.Read)
Create an email account that uses the custom role in (b).
Send BlueFletch the directory account's email address. BlueFletch enables the feature for your organization.
Update your Launcher configuration with the directory service URL, and map groups to apps.
Step 1: Get Your Client ID and Service URL from BlueFletch
Contact your BlueFletch representative or BlueFletch Support and ask to enable Google Workspace Groups. Include:
Your BlueFletch organization ID (the
orgIdin your Launcher configuration)Your Google Workspace domain (e.g.
example.com)Which BlueFletch environment(s) you use (for example, a QA and a Production organization)
BlueFletch will send you:
Client ID: a long number (about 21 digits) used in Step 2. This is a Google Cloud ID that represents the BlueFletch service's service account.
Directory service URL: used in Step 4.
Step 2: Configure Google Workspace
A Google Workspace super admin performs these steps in admin.google.com.
2a. Authorize BlueFletch's Service Account (domain-wide delegation)
Go to Security → Access and data control → API controls.
Under Domain wide delegation, click Manage Domain Wide Delegation, then Add new.
In Client ID, enter the numeric Client ID from BlueFletch.
In OAuth scopes, enter exactly (comma-separated):
Click Authorize.
2b. Create a custom read-only admin role
Go to Account → Admin roles and click Create new role.
Name it, for example, BlueFletch Directory Reader.
Under Admin API privileges, check only:
Users → Read
Groups → Read
Leave all Admin console privileges unchecked.
Click Continue, then Create role.
2c. Create the directory account and assign the new custom role
Go to Directory → Users and add a dedicated user, for example
dir-reader@example.com. It does not need a mailbox or any other Google services.Open the role from 2b, click Assign role, and assign it to this user at your top-level organizational unit, so it can read every user who signs in on your devices.
Use a dedicated account, not a super admin's personal account.
Don't suspend or delete this account. Lookups stop working if you do.
Nobody needs to sign in as this account. BlueFletch acts on its behalf only to make the read-only calls above.
Step 3: Send the Directory Account to BlueFletch
Send BlueFletch the email address of the account from 2c (for example dir-reader@example.com). BlueFletch will enable the feature for your organization and let you know when it's ready.
Step 4: Configure Launcher
Add directoryProxyUrl to the google object inside appConfig.bfAuth, using the directory service URL from BlueFletch.
Configuration
The following key-value pairs can be set within the appConfig.bfAuth.google object of the Launcher configuration JSON file.
directoryProxyUrl
String
The directory service URL provided by BlueFletch. When not set, the feature is off and sign-in works as before.
directoryProxyRequired
Boolean
When true, sign-in fails if the department and groups can't be retrieved. When false, the user is still signed in, just without directory groups. Default is false.
Example Configuration
How groups appear in the session
After sign-in, the user's groups are set in this order:
The user's department (for example
Store Operations)The user's Google groups, as group email addresses (for example
store-managers@example.com)Your
auth_default_group, if configured
For example, a user in the Store Operations department who belongs to two groups would have:
Groups are direct memberships only. If a user is in a group only through another group (a nested group), that group isn't included.
Group email addresses are lowercase.
The department is the one on the user's primary organization in Google Workspace (Directory → Users → User information → Employee information).
Mapping groups to apps
Use the department and group emails as keys in group_inclusion, exactly as they appear above:
Use the group's email address (for example store-managers@example.com), not its display name ("Store Managers").
Troubleshooting
User signs in but only has auth_default_group
The lookup failed, or the feature isn't enabled for your organization yet
Confirm Step 3 is complete with BlueFletch. Check that directoryProxyUrl is set.
No groups right after setup
Google Admin Console changes haven't taken effect yet
Wait and try again.
Department appears but no groups
Only the user scope was authorized, or the role is missing Groups → Read
Check the scopes in 2a and the role privileges in 2b.
No department
The user has no department set in Google Workspace
Set the department on the user's profile in Admin Console.
Some users work and others don't
The role in 2c is assigned to a sub-organizational unit
Assign the role at the top-level organizational unit.
Everything stopped working
The directory account was suspended or deleted, or the delegation grant was removed or changed
Restore the account or grant, making sure the scopes match 2a exactly.
Sign-in fails completely (directoryProxyRequired is true)
The lookup failed
Set directoryProxyRequired to false while troubleshooting, then contact BlueFletch Support.
When contacting BlueFletch Support, include your organization ID, Workspace domain, and the time of a failed sign-in.
Last updated