> ## Documentation Index
> Fetch the complete documentation index at: https://docs.proofage.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up SAML with Google Workspace

> Connect Google Workspace to the ProofAge console with SAML 2.0: the custom SAML app, the email attribute, the metadata XML and a first test sign-in.

This guide connects a Google Workspace organization to ProofAge. Read [SAML single sign-on](https://docs.proofage.net/console/saml-sso.md) first for what each setting does. You need an administrator account in ProofAge, a Google Workspace administrator who can add apps, and access to your domain's DNS.

**1. Verify your email domain in ProofAge**

In the ProofAge console, open **Settings → SSO**, add your email domain (for example `acme.com`), publish the TXT record shown at your DNS provider and choose **Check now**. Keep the record once the domain is verified. See [Verify your email domains](https://docs.proofage.net/console/saml-sso.md#1-verify-your-email-domains).

**2. Create the ProofAge connection**

Still under **Settings → SSO**, choose **Set up single sign-on**. Keep the page open: you need its **Entity ID** and **ACS URL** to set up Google, and its **Sign-in URL** once the connection is enabled.

![The values ProofAge gives your identity provider](https://mintcdn.com/proof-age/ljr6IF0IRgMO705h/images/saml-google-workspace/01-proofage-sp-details.png?fit=max\&auto=format\&n=ljr6IF0IRgMO705h\&q=85\&s=fd06077f83ea48f987eaaca04033fc1f)

**3. Add a custom SAML app in Google**

In the [Google Admin console](https://admin.google.com), go to **Apps → Web and mobile apps → Add app → Add custom SAML app**. Name it `ProofAge` and continue.

![Add custom SAML app in the Google Admin console](https://mintcdn.com/proof-age/ljr6IF0IRgMO705h/images/saml-google-workspace/02-google-add-saml-app.png?fit=max\&auto=format\&n=ljr6IF0IRgMO705h\&q=85\&s=a1424d9d1446177011071ad861313b3c)

**4. Download Google's metadata**

On **Google Identity Provider details**, choose **Download metadata** and keep the file: you paste its contents into ProofAge later. Then continue.

![Download the identity provider metadata](https://mintcdn.com/proof-age/ljr6IF0IRgMO705h/images/saml-google-workspace/03-google-idp-metadata.png?fit=max\&auto=format\&n=ljr6IF0IRgMO705h\&q=85\&s=ee68c4000775378a7ca251aae406ec11)

**5. Enter the service provider details**

| Google field | Value |
| - | - |
| **ACS URL** | ProofAge's **ACS URL** |
| **Entity ID** | ProofAge's **Entity ID** |
| **Start URL** | Leave empty |
| **Signed response** | Leave unticked: Google signs the assertion, which ProofAge accepts |
| **Name ID format** | `EMAIL` |
| **Name ID** | `Basic Information > Primary email` |

![Service provider details with the Name ID set to the primary email](https://mintcdn.com/proof-age/ljr6IF0IRgMO705h/images/saml-google-workspace/04-google-service-provider.png?fit=max\&auto=format\&n=ljr6IF0IRgMO705h\&q=85\&s=a740c4b09eb1df260a33bcfdd6eb3ba3)

Then continue.

**6. Map the email and name attributes**

On **Attribute mapping**, choose **Add mapping** for each of these three rows, then choose **Finish**. When you edit the app later, the button is **Save**, as in the screenshot.

| Google Directory attributes | App attributes |
| - | - |
| Primary email | `email` |
| First name | `givenname` |
| Last name | `surname` |

Add the `email` mapping even though the Name ID is already the email address: without it ProofAge answers "Your identity provider did not send an email address." The two name attributes give accounts created on first sign-in a proper name.

![The three attribute mappings](https://mintcdn.com/proof-age/ljr6IF0IRgMO705h/images/saml-google-workspace/05-google-attribute-mapping.png?fit=max\&auto=format\&n=ljr6IF0IRgMO705h\&q=85\&s=ac210fdbc0ee10fd54450c0447bf3bd9)

**7. Turn the app on**

A new app is off for everyone. On the app's page, open **User access**, select **ON for everyone**, or select an organizational unit or group on the left and turn the app on there, then choose **Save**. Include your own account: you test with it below. Google says most changes take effect in a few minutes.

![Turning the app on under User access](https://mintcdn.com/proof-age/ljr6IF0IRgMO705h/images/saml-google-workspace/06-google-user-access.png?fit=max\&auto=format\&n=ljr6IF0IRgMO705h\&q=85\&s=aa41f9446fcb72b1b72dae1257051e30)

**8. Give ProofAge Google's metadata**

In ProofAge, under **2. Tell us about your identity provider**, choose **Paste metadata XML**, paste the contents of the file you downloaded and choose **Save identity provider**. ProofAge may first ask you to confirm it is you.

It then shows Google's entity ID, Google's sign-in URL (Google calls it **SSO URL**) and the certificate's SHA-256 fingerprint and expiry date. Compare the fingerprint with the **SHA-256 fingerprint** Google shows under **Download metadata** on the app's page. Google writes it in capitals with colons; the characters must be the same.

![The identity provider, saved](https://mintcdn.com/proof-age/ljr6IF0IRgMO705h/images/saml-google-workspace/07-proofage-idp-saved.png?fit=max\&auto=format\&n=ljr6IF0IRgMO705h\&q=85\&s=41367dad90fd41387032b4e9ff30d085)

**9. Enable and test**

1. Optionally turn on **Create accounts on first sign-in** and choose the **Role for new members**. Then choose **Enable single sign-on**.

2. Link your own account: open **Profile → Security → Sign-in methods**, choose **Link single sign-on for** your organization and sign in at Google. Do this before you try the sign-in page: an account whose email address was never verified is refused there until single sign-on is linked.

   ![Single sign-on linked to your account](https://mintcdn.com/proof-age/ljr6IF0IRgMO705h/images/saml-google-workspace/08-proofage-link-account.png?fit=max\&auto=format\&n=ljr6IF0IRgMO705h\&q=85\&s=96623e0c83348b9efd227b3b08abd35a)

3. Back in **Settings → SSO**, the page says "You have signed in through this connection."

   ![The connection, enabled and tested](https://mintcdn.com/proof-age/ljr6IF0IRgMO705h/images/saml-google-workspace/09-proofage-enabled.png?fit=max\&auto=format\&n=ljr6IF0IRgMO705h\&q=85\&s=40ea9f086b8ce97dc474adc704a13e78)

4. Sign out and use **Sign in with SSO** with your work email to see what your team will see.

**10. Require it (optional)**

Under **Settings → Security**, turn on **Require single sign-on**. Keep **Break-glass for administrators** on, and make sure at least one administrator has a passkey, or a password with an authenticator app, so that an outage at your identity provider cannot lock you out. To use break-glass, sign in with your password and authenticator code, or with a passkey, instead of single sign-on. See [Require single sign-on](https://docs.proofage.net/console/saml-sso.md#7-require-single-sign-on-optional).

![Require single sign-on with break-glass](https://mintcdn.com/proof-age/ljr6IF0IRgMO705h/images/saml-google-workspace/10-proofage-require-sso.png?fit=max\&auto=format\&n=ljr6IF0IRgMO705h\&q=85\&s=040eae7250348d1cf6bb56ba5b374a6b)

## Give people a link, not Google's app tile

Once the app is on, people see a ProofAge tile in Google's app launcher. Do not send them to it: it starts the sign-in at Google (IdP-initiated), and ProofAge accepts only a sign-in it started itself.

Give them ProofAge's **Sign-in URL** (under **Settings → SSO**) instead, for example as a bookmark on your intranet. It works once the connection is enabled. See [The sign-in URL for dashboard tiles](https://docs.proofage.net/console/saml-sso.md#the-sign-in-url-for-dashboard-tiles).

## When the certificate changes

Google's certificate has an expiry date, shown in the Admin console and in ProofAge. ProofAge does not warn you before it expires. You can replace it without interrupting sign-in, because ProofAge keeps two certificates at once:

1. In Google, open the app's **Service provider details**, choose **Manage certificates**, then **Add certificate**.
2. On the same **SAML certificates** page, choose **Download metadata**. This file holds both certificates.
3. In ProofAge, paste its contents under **Paste metadata XML** and choose **Save identity provider**. The console now lists two certificates.
4. Back in Google, select the new certificate in the app's **Certificate** list and save. Google can take a few minutes to start signing with it.

Keep this order. If you select the new certificate before ProofAge has it, sign-ins are refused with "The identity provider's response could not be verified" once Google starts using it. Save the metadata with both certificates to fix it; an administrator can get in meanwhile with break-glass.

## If it fails

The sign-in page says why; most refusals are also in **Settings → Audit log** as *Single sign-on refused*. The usual causes with Google Workspace:

* **"Your identity provider did not send an email address"**: the `email` attribute mapping is missing or misspelled.
* **"Sign in with your password, then link…"**: the person's ProofAge account has an email address that was never verified. They sign in with their password and link single sign-on from **Profile → Security → Sign-in methods**, or reset their password, which verifies the address. A reset in this case also removes linked sign-in methods and signs out connected apps: see [Your account security](https://docs.proofage.net/console/account-security.md).
* **"Your account is not a member of this organization"** or **"No account exists for this address"**: invite the person under **Team**, or turn on **Create accounts on first sign-in**.
* **"The identity provider's response could not be verified"**: the ACS URL or Entity ID does not match ProofAge's values exactly, or Google's certificate expired or changed. Save Google's metadata in ProofAge again.
* **"This sign-in request expired or was already used"**: the sign-in started from Google's app launcher. Start at ProofAge or from its **Sign-in URL**.
* **Google says the app is not enabled for the user**: check **User access** and wait a few minutes.

See the full list in [When a sign-in is refused](https://docs.proofage.net/console/saml-sso.md#when-a-sign-in-is-refused).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.