This post will illustrate how to integrate Okta and Google workspace, options of integration and how to migrate users or stage the migration, the authentication flows and inbound federation
The implementation was done on a small scale and in testing environments. Any production application should be reviewed and planned accordingly without solely relying on this post
Google Workspace, like many other applications, is currently integrated with Okta. As more SaaS services become SAML 2.0 capable, or if not, OIDC capable, integrating other systems for identity authentication becomes simpler and easier
While we focus on exploring the options available with Google Workspace and Okta, we will also cover a general perspective on the protocols and methods used, which can be applied to different applications.
Generally the application integration can be staged in parts,
- Authentication
- Provisioning
- Assignment
Google Workspace Application
Start by adding the google application from Applications -> Applications -> Catalog then filter to find the application
![All You Need To Know About Okta and Google Workspace Integration (1) All You Need To Know About Okta and Google Workspace Integration (1)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-3.png?resize=1024%2C342&ssl=1)
Add the integration and start the initial setup
![All You Need To Know About Okta and Google Workspace Integration (2) All You Need To Know About Okta and Google Workspace Integration (2)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-4.png?resize=1018%2C1024&ssl=1)
The next page will take you to the settings option either Secure Web Authentication or SAML2.0
SSO SAML 2.0 Option 1: Manual
After choosing this option, there will be detailed steps to follow from view setup instructions
![All You Need To Know About Okta and Google Workspace Integration (3) All You Need To Know About Okta and Google Workspace Integration (3)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-5.png?resize=847%2C1024&ssl=1)
The values will be populated automatically,
![All You Need To Know About Okta and Google Workspace Integration (4) All You Need To Know About Okta and Google Workspace Integration (4)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-6.png?resize=1024%2C653&ssl=1)
Keep the window open and download the verification certificate
Go to Google admin console -> Security -> Authentication -> SSO with third party IdP
![All You Need To Know About Okta and Google Workspace Integration (5) All You Need To Know About Okta and Google Workspace Integration (5)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-7.png?resize=1024%2C488&ssl=1)
Add SAML profile and then substitute the values from Okta
![All You Need To Know About Okta and Google Workspace Integration (6) All You Need To Know About Okta and Google Workspace Integration (6)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-8.png?resize=749%2C1004&ssl=1)
Then once saved the profile will have the SP details, from the RPID value can be found
![All You Need To Know About Okta and Google Workspace Integration (7) All You Need To Know About Okta and Google Workspace Integration (7)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-9.png?resize=1024%2C525&ssl=1)
Note: There is option to configure the SSO profile to the entire org, however using third party profile will add more flexibility to apply it later on
Go back to Okta and update the value
![All You Need To Know About Okta and Google Workspace Integration (8) All You Need To Know About Okta and Google Workspace Integration (8)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-10.png?resize=764%2C624&ssl=1)
At this stage the federation should be ready, one last step is to add the profile to the organization for authentication to happen with Okta.
![All You Need To Know About Okta and Google Workspace Integration (9) All You Need To Know About Okta and Google Workspace Integration (9)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-12.png?resize=1024%2C378&ssl=1)
Then assign the profile
![All You Need To Know About Okta and Google Workspace Integration (10) All You Need To Know About Okta and Google Workspace Integration (10)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-16.png?resize=1024%2C658&ssl=1)
As you can see above there are 2 options
- Have Google prompt for their username, then redirect them to this profile’s IDP sign-in page
- Require users to enter their Google username and password to sign in
The first option will apply the SP-initiated flow which means users will be redirected to Okta to authenticate when they login directly to Google account
The second option will allow the user to login with username and password normally, however they can still federate and access through Okta in IdP-Initiated flow
Note: At the beginning of the migration, you might allow users to log in directly with their Google username and password. Once all users are migrated or created in Okta, you can remove this option and always redirect users to Okta.
Remember, users must be in Okta before redirecting them there. Therefore, ensure that before enforcing authentication with Okta, you have either manually added the users or provisioned them through SCIM. In both cases, users must activate their accounts in Okta
Below video from testing org to illustrate the entire process
SSO SAML 2.0 Option 2: 1-click
At some point where you need to integrate multiple different google tenants, using 1-click can make the configuration for the SAML part much faster
To enable the feature, go to Settings -> Features.
Currently its in EA as of the date of writing this post
![All You Need To Know About Okta and Google Workspace Integration (11) All You Need To Know About Okta and Google Workspace Integration (11)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-34.png?resize=867%2C83&ssl=1)
Then start the google integration similar to part1, this time once you choose SAML, another option will show for 1-click
![All You Need To Know About Okta and Google Workspace Integration (12) All You Need To Know About Okta and Google Workspace Integration (12)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-35.png?resize=660%2C618&ssl=1)
![All You Need To Know About Okta and Google Workspace Integration (13) All You Need To Know About Okta and Google Workspace Integration (13)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-36.png?resize=660%2C618&ssl=1)
Then connect your google account, this account will also be used for provisioning covered later in user provisioning part
![All You Need To Know About Okta and Google Workspace Integration (14) All You Need To Know About Okta and Google Workspace Integration (14)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-37.png?resize=547%2C305&ssl=1)
![All You Need To Know About Okta and Google Workspace Integration (15) All You Need To Know About Okta and Google Workspace Integration (15)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-39.png?resize=571%2C754&ssl=1)
Allow the access
![All You Need To Know About Okta and Google Workspace Integration (16) All You Need To Know About Okta and Google Workspace Integration (16)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-40.png?resize=661%2C400&ssl=1)
The RPID will also be automatically updated, the next step will be to check the Google admin console
![All You Need To Know About Okta and Google Workspace Integration (17) All You Need To Know About Okta and Google Workspace Integration (17)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-41.png?resize=916%2C379&ssl=1)
There is a new profile ready to use, under Manage SSO profiles assign the profile to the organization unit
![All You Need To Know About Okta and Google Workspace Integration (18) All You Need To Know About Okta and Google Workspace Integration (18)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-42.png?resize=919%2C669&ssl=1)
1-click, will make it easy to configure the integration in easy fashion, the provisioning part must be enabled and save then you can start provisioning without additional authentication
Organization Unit For SAML Testing
The OU can be created and tested in case you want to have phased approach towards authenticating with Okta
To do this first create OU in Google, Directory -> Organization Units
![All You Need To Know About Okta and Google Workspace Integration (19) All You Need To Know About Okta and Google Workspace Integration (19)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-100.png?resize=484%2C449&ssl=1)
The OU will inherent the security settings from parent org
Then go to Security -> SSO with third-party IDPs -> Manage SSO profile assignments, under the OU click on it and manage the assign the SAML profile
![All You Need To Know About Okta and Google Workspace Integration (20) All You Need To Know About Okta and Google Workspace Integration (20)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-102.png?resize=1024%2C695&ssl=1)
This will make sure that only users under the OU will have the SAML settings rest of the org will not be part of the SSO profile
User Provisioning
The user provisioning is the part that enables Okta to communicate with the application using SCIM and be able to bring users to Okta also enable Okta to Create, Update, Deactivate the user in the downstream application. Overall making the lifecycle of user centralized and automated.
Will start the provisioning after creating the application.
![All You Need To Know About Okta and Google Workspace Integration (21) All You Need To Know About Okta and Google Workspace Integration (21)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-43.png?resize=942%2C1024&ssl=1)
Use the default options and authenticate with google account
![All You Need To Know About Okta and Google Workspace Integration (22) All You Need To Know About Okta and Google Workspace Integration (22)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-44.png?resize=798%2C472&ssl=1)
![All You Need To Know About Okta and Google Workspace Integration (23) All You Need To Know About Okta and Google Workspace Integration (23)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-45.png?resize=499%2C768&ssl=1)
Allow the access after that save the configuration
Then the options for provisioning will be available
- Okta to App
- App to Okta
Okta To Google Workspace
For Google Workspace, Okta supports multiple operations
![All You Need To Know About Okta and Google Workspace Integration (24) All You Need To Know About Okta and Google Workspace Integration (24)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-46.png?resize=794%2C684&ssl=1)
By default nothing is enabled, the first 3 are important for lifecycle management
With password sync option, its possible to sync user password with Google or sync a random password in Google for the user
![All You Need To Know About Okta and Google Workspace Integration (25) All You Need To Know About Okta and Google Workspace Integration (25)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-47.png?resize=776%2C475&ssl=1)
Random password sync will not allow the user to login to google using password.As mentioned in previous section that is possible to allow username/password to login to google directly, this scenario with random password will be best if you always intent to use Okta as source of truth with no options for password login
Google Workspace To Okta
Multiple options are available, if there will be plans to schedule import this can be enabled in general also the user format
![All You Need To Know About Okta and Google Workspace Integration (26) All You Need To Know About Okta and Google Workspace Integration (26)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-48.png?resize=672%2C1024&ssl=1)
The user can be imported if there is a match; if not, a new user will be created.
The option to confirm can be automatically available. This option will be useful when the scheduled import is configured.
Below Video explains the user provisioning part
Application Assignment
The final step in achieving a functional integration is to assign users to the application so they can authenticate through Okta and access Google.
Users can be assigned without provisioning as long as they are created manually in Google.
If provisioning is enabled, then more options are available for application assignment
![All You Need To Know About Okta and Google Workspace Integration (27) All You Need To Know About Okta and Google Workspace Integration (27)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-49.png?resize=470%2C1024&ssl=1)
Below Video cover this process
Inbound Federation with Google Workspace
To enable inbound federation which means allowing users to login to Okta using their Google account, in this case admins must build trust between Okta and Google workspace in order to allow a login option using Google then create a Identity provider routing rule in Okta for this option to work
To configure inbound federation, there are 2 steps
- Identity Provider
- Routing rules
Identity Provider
First go to Security -> Identity Provider:
![All You Need To Know About Okta and Google Workspace Integration (28) All You Need To Know About Okta and Google Workspace Integration (28)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-50.png?resize=899%2C1024&ssl=1)
Choose Google Idp and next
![All You Need To Know About Okta and Google Workspace Integration (29) All You Need To Know About Okta and Google Workspace Integration (29)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-51.png?resize=1024%2C594&ssl=1)
At this stage, you will need to go to https://console.cloud.google.com/
then create a new project
![All You Need To Know About Okta and Google Workspace Integration (30) All You Need To Know About Okta and Google Workspace Integration (30)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-52.png?resize=1024%2C230&ssl=1)
The consent must be configured at first before adding credentials, go to API & Services -> OAuth consent screen
![All You Need To Know About Okta and Google Workspace Integration (31) All You Need To Know About Okta and Google Workspace Integration (31)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-103.png?resize=1024%2C371&ssl=1)
![All You Need To Know About Okta and Google Workspace Integration (32) All You Need To Know About Okta and Google Workspace Integration (32)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-56.png?resize=673%2C527&ssl=1)
Then configure the application name and authorized domains
![All You Need To Know About Okta and Google Workspace Integration (33) All You Need To Know About Okta and Google Workspace Integration (33)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-57.png?resize=522%2C1024&ssl=1)
Save and then define the scope
![All You Need To Know About Okta and Google Workspace Integration (34) All You Need To Know About Okta and Google Workspace Integration (34)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-104.png?resize=872%2C930&ssl=1)
![All You Need To Know About Okta and Google Workspace Integration (35) All You Need To Know About Okta and Google Workspace Integration (35)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-58.png?resize=747%2C702&ssl=1)
Email, Profile and openid
Update and continue to the summary page to view the configuration
Now go back to the credentials page and create credentials
![All You Need To Know About Okta and Google Workspace Integration (36) All You Need To Know About Okta and Google Workspace Integration (36)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-59.png?resize=1006%2C518&ssl=1)
The choose the application type Web application
![All You Need To Know About Okta and Google Workspace Integration (37) All You Need To Know About Okta and Google Workspace Integration (37)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-60.png?resize=724%2C900&ssl=1)
It’s very important to add the correct authorized URI towards your tenant
Once created the Client ID and Client Secret will be available
![All You Need To Know About Okta and Google Workspace Integration (38) All You Need To Know About Okta and Google Workspace Integration (38)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-61.png?resize=532%2C575&ssl=1)
Now go back to Okta and add the Client id and Client Secret
![All You Need To Know About Okta and Google Workspace Integration (39) All You Need To Know About Okta and Google Workspace Integration (39)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-62.png?resize=1024%2C548&ssl=1)
There are more options like account linking ,,etc if you need to modify or enable account linking change the default settings below
![All You Need To Know About Okta and Google Workspace Integration (40) All You Need To Know About Okta and Google Workspace Integration (40)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-105.png?resize=1024%2C713&ssl=1)
In this example leave the default options and then Finish, if some users already exist you can enable the account linking policy which will link the account to the existing one
Routing Rules
Routing rules, is the way how Okta can detect which users to forward them to Identity provider or prompt an option for users to login using Google
from routing rule
![All You Need To Know About Okta and Google Workspace Integration (41) All You Need To Know About Okta and Google Workspace Integration (41)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-63.png?resize=1011%2C286&ssl=1)
add a new rule
![All You Need To Know About Okta and Google Workspace Integration (42) All You Need To Know About Okta and Google Workspace Integration (42)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-107.png?resize=783%2C785&ssl=1)
In this rule i allowed to show google as login option by choosing the idp to also have google as option to login
Then Activate the rule to take effect
![All You Need To Know About Okta and Google Workspace Integration (43) All You Need To Know About Okta and Google Workspace Integration (43)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-108.png?resize=414%2C565&ssl=1)
From routing rules, there is option to choose different routing logic to avoid having Google as option and only route the user to Google once specific condition matched
![All You Need To Know About Okta and Google Workspace Integration (44) All You Need To Know About Okta and Google Workspace Integration (44)](https://i0.wp.com/i0.wp.com/iamse.blog/wp-content/uploads/2024/06/image-109.png?resize=782%2C795&ssl=1)
This will redirect the user based on the domain they try to login from, so users will put their username@example.com then Okta will redirect to Google
Below user experience for this configuration
References
https://help.okta.com/en-us/content/topics/provisioning/google/google-provisioning.htm