Manage enterprise connections
Auth and access
In Kinde, you can use SAML as your authentication protocol. Kinde acts as a service provider (SP), so you still need to bring your own identity provider (IdP) to set it up. Identity providers can include Google, Microsoft, Cloudflare, and others.
Looking to let your own team sign in to third-party tools using Kinde as the identity provider? See Workforce identity in Kinde.
Note: Since there are differences between set ups for each IdP, we are unable to provide full details on how to configure them all to connect with Kinde. However, the fields we mention below, should have similar names in your IdP. Some concepts are explained in the advanced SAML configurations topic.
Before you set up SAML, you can import users in bulk, add them via API, or manually in Kinde. Alternatively, you can also take advantage of just-in-time (JIT) provisioning (Step 13 below) when you set up the connection.
You can increase SAML security by adding a certificate and private key pair to your setup. Your IdP will check that the certificate and private key matches, each time a user authenticates this way.
You can obtain the certificate and key from your IdP or you can generate yourself, see below.
In your preferred system, run a command to generate a certificate and key. For example, on *nix systems, the command is:
openssl req -x509 -nodes -sha256 -days 3650 -newkey rsa:2048 -keyout private_key.key -out certificate.crtThis command may also work in other systems, such as WSL on Windows. Alternatively, you can try installing openssl binaries for your system.
Once the files are generated, save them locally.
Add the certificate to your IdP settings. The certificate there and the one in Kinde must match exactly. Instructions for how to do this varies, depending on your IdP.
Copy the certificate and private key details into Kinde as per the procedure below.
Depending on your SAML set up, you may need to include advanced configurations for your connection. See Advanced SAML configurations
Enter a name for the connection. It must match the name in your SAML setup.
Enter an Entity ID. In SAML metadata this identifier is often labeled entityID. For SAML SSO, the entity ID must match between your Kinde enterprise connection and your IdP. This is a value you can make up using a random alphanumeric string, e.g. 5836g209gbhw09r8y0913. The Entity ID you enter here must be configured exactly the same in your identity provider (unless your IdP is Microsoft Azure).
If Microsoft is your provider and your app is a bit older, you may need to add spn: to the beginning of the Entity ID string in Kinde, e.g. spn:5836g209gbhw09r8y0913. This is not required for newly created apps.
Provide the identity provider’s metadata. Kinde uses it to find your IdP’s sign-in endpoint and the certificates it signs responses with. There are two ways to do this; use one or the other.
If you fill in both fields, Kinde uses the pasted XML and ignores the URL.
A metadata URL is lower maintenance, because Kinde always sees your IdP’s current certificates. If your IdP does not host one, you can still get this behaviour by uploading the file to a publicly accessible location such as an AWS S3 bucket, Cloudflare R2, a GitHub Gist, or any public website, and entering that URL. Remember to re-upload the file when your IdP’s certificates change, and make sure the URL is reachable from Kinde’s servers: a CDN that blocks requests by country can block Kinde too.
Pasting the XML is simpler to set up and keeps the metadata private, but you own keeping it current. Kinde warns you on the home page 30 days before the newest signing certificate in pasted metadata expires. See Keep IdP signing certificates current.
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.
Switch on the connection. This will make it instantly available to users if this is your production environment.
Select Save.
Next: Complete any additional configuration in your identity provider’s settings, such as adding the Entity ID and return URL.
Once you have entered the ACS URL in your identity provider, the connection should be enabled.
Your identity provider signs every SAML response with a certificate, and Kinde checks that signature against the certificates published in the IdP metadata. Signing certificates expire, so at some point your IdP will rotate to a new one. This section explains how Kinde handles that, and what you need to do.
validUntil attribute on the metadata file itself. Some providers, including Google, set it to the expiry date of the current certificate.This means you can publish the new certificate alongside the old one, switch your IdP over whenever you are ready, and switch back if anything goes wrong. For a connection that uses an IdP metadata URL, you can do this without touching the connection in Kinde. For a connection that uses pasted metadata XML, save the updated metadata in Kinde before you switch.
The steps depend on how the connection receives the metadata.
Connection uses an IdP metadata URL
Connection uses pasted IdP metadata XML
Do the Kinde step first in either case. Once the new certificate is in the metadata Kinde reads, the switch in your IdP cannot interrupt sign-in.
Rolling back
If sign-in fails after the switch, change your IdP back to the previous certificate. It keeps working until its expiry date, as long as it is still listed in the metadata. You can remove the old certificate from the metadata after it expires, but leaving it there does no harm.
For connections that use pasted metadata XML, Kinde checks the certificates in the stored file. When the newest signing certificate expires within 30 days, or has already expired, you will see an SSO connection issue banner on the Kinde home page and on the connection’s configuration dialog, naming the connection and the expiry date. Paste the updated metadata from your IdP to clear it.
Connections that use a metadata URL are not checked, because Kinde reads the IdP’s current certificates at every sign-in.
If a connection uses a metadata URL that you host yourself, Kinde cannot warn you when the certificate in your copy is about to expire. Put a reminder in your calendar ahead of the expiry date, or switch the connection to pasted XML so Kinde can warn you.