Manage enterprise connections
Auth and access
You can set up SAML to work with your Google Workspace.
Google gives you the SAML metadata as a file to download, and does not host it at a URL. You can get it into Kinde in either of two ways:
If you fill in both fields, Kinde uses the pasted XML and ignores the URL. This guide shows both options where they differ.
Depending on your SAML set up, you may need to include advanced configurations for your connection. See Advanced SAML configurations.
You can make a connection available only to a specific organization, or you can create it so it can be used across any organization in your business.
Enter the Connection name. This name is what will appear on the button on the authentication screen. We will call it ‘Google Workspace’ for this example.
Enter an Entity ID. This field can be any mix of numbers and letters, as long as it matches your IdP configuration. Copy this somewhere you can access it later.
If you are adding this connection to a live environment, you must provide either an IdP metadata URL or IdP metadata XML before you can save. You get the metadata from Google in Step 3, so for now either paste a placeholder URL (you will replace it later) or come back to save after Step 3.
Enter a sign in URL if your IdP requires a specific URL.
If you want, select the Sign request algorithm and Protocol binding. The options you choose will depend on what your identity provider prefers or requires.
Select a Name ID format. This helps identify and link user identities between your IdP and Kinde.
Enter an Email key attribute. This is the attribute in the SAML token that contains the user’s email. Setting this value ensures that the email address returned in the SAML response is correctly retrieved. We do not recommend leaving this field blank, but if you do we will set ‘email’ as the attribute.
(Optional) Add a first name and last name key attribute.
Enter any relevant Home realm domains. This is how SAML recognizes a user’s credentials and routes them to the correct sign in page. Note that home realm domains need to be unique across all connections in an environment. Read more about home realm domains.
If you use home realm domains, the sign in button is hidden on the auth screen by default. To show the SSO button, select the Always show sign-in button option.
Copy the relevant reply URL:
If you want to enable just-in-time (JIT) provisioning for users, select the Create a user record in Kinde option. This saves time adding users manually or via API later.
For an environment-level connection, under Email address trust, select Verify, then trust. For details about the options, see Trusting emails from providers. Organization-level connections show Auto-add users instead.
(Optional) In the Sign SAML request section, paste in the Signed certificate and Private key. You may have got these from your IdP or you may have generated yourself (see procedure above).
Enter any upstream params that you want to pass to the identity provider. Not all providers support this, so check their documentation first.
Select Save.
Sign in to your Google Workspace Admin Console.
In the main menu, go to Apps > Web and Mobile Apps.
Select Add App > Add custom SAML app.
Complete the App details window:
Copy the Google Identity Provider details by selecting DOWNLOAD METADATA under Option 1. This is the file you will paste into Kinde or upload to a file storage location in Step 4.
Select Continue.
Enter the Service provider details:
On the Attribute mapping page, select Finish.
If you want to grant access to other users, select the chevron in the right corner of the User access panel. This opens additional options.
If you want, you can change the access to suit your organization’s needs. You can do this per Organizational unit or switch ON for everyone.
Select Save.
Use one of the following, depending on the option you chose at the start.
Option 1: Paste the file (recommended)
Open the metadata file you downloaded from Google in a text editor and copy all of its contents.
In Kinde, open the connection’s configuration page.
Paste the contents into the IdP metadata XML field. Leave IdP metadata URL blank, or clear any placeholder you entered earlier.
Kinde will warn you 30 days before the newest signing certificate in pasted metadata expires.
Option 2: Host the file
Google signs SAML responses with an identity provider certificate that is valid for five years. Before it expires, you need to move the SAML app to a new certificate. Kinde trusts every signing certificate listed in the metadata and verifies each response against the one that signed it, so you can add the new certificate first and switch over whenever you are ready. See Keep IdP signing certificates current for how this works.
If sign-in fails, switch the app back to the previous certificate in Google. It keeps working until its expiry date, as long as it is still in the metadata Kinde reads.
The downloaded metadata has a validUntil attribute that Google sets to the expiry date of the certificate the app currently uses. Kinde does not enforce it, so a file whose validUntil has passed still works. After you switch to the new certificate, download the metadata once more and update Kinde so the attribute reflects the new certificate.
Once you have completed the above steps, you should be able to see a Google Workspace sign-in button on your product’s authentication screen. Note: if you gave the enterprise connection a different name in Kinde, the button will have the name you entered.
If you can’t see the button:
Try to sign in and hopefully - success!!