# Google Workspace

> Create a custom SAML application for your Workspace users.

Source: https://diakrin.com/docs/sso/google-workspace

Use a custom SAML app for managed company sign-in. This is separate from a consumer **Sign in with Google** button. You need permission to manage SAML applications in Google Admin Console.

## Create the application

1. Open **Apps → Web and mobile apps → Add app → Add custom SAML app**.
2. Name the app **Diakrin**. Download the Google identity-provider metadata XML and retain it for the activation handoff.
3. In **Service provider details**, enter the ACS URL and Entity ID from your [setup packet](/docs/sso#get-your-setup-packet).
4. Set Name ID to the user’s primary work email with **EMAIL** format, and add an `email` attribute mapping from **Basic Information → Primary email**.
5. Enable the app for your pilot organizational unit or access group. Keep the broader organization disabled until the pilot succeeds.

## Map the fields

| Google Workspace field | Value |
| --- | --- |
| ACS URL | Diakrin ACS URL |
| Entity ID | Diakrin SP Entity ID |
| Name ID | Primary work email |
| Name ID format | EMAIL |
| Attribute mapping `email` | Primary email |

## Activate and test

Return the metadata XML, approved domains and certificate expiry to your Diakrin onboarding contact. After activation, start from Diakrin’s company SSO form and follow [Test and roll out SSO](/docs/sso/testing). Allow for Google’s application-access changes to propagate before retesting.

When sign-in succeeds but the organization is missing, check the Diakrin invitation and project assignment; Google application access does not create those grants.

Official reference: [Set up your own custom SAML app](https://knowledge.workspace.google.com/admin/apps/set-up-your-own-custom-saml-app).
