---
title: 'Tutorial: How to Configure SAML with Google Workspace for VPN Authentication'
canonical: https://openvpn.net/as-docs/tutorials/saml-google-workspace/
product: Access Server Docs
description: Step-by-step guide for configuring SAML on Google Workspace VPN Access Server.
---

# Tutorial: How to Configure SAML with Google Workspace for VPN Authentication

## Overview

Access Server 2.11 and newer supports authentication using SAML with Google Workspace as the identity provider. You can configure this in Google Workspace with Access Server as your service provider.

The following steps walk you through enabling SAML authentication for users from Google Workspace to Access Server.

## Prerequisites

You need the following to get started:

- A [Google Workspace](https://workspace.google.com/).
- A deployed [Access Server](https://openvpn.net/quick-start-guide/).

> **Important**
>
> We recommend using all lowercase usernames when signing in with SAML.

## Step 1: Create the Google Workspace SAML application

With Google Workspace, you must create a SAML integration application.

First, gather information about your Access Server as the service provider (SP).

1. Sign in to your Access Server Admin Web UI.
2. Select **Authentication → SAML**.
3. You'll need the following information:
   1. **SP Identity**.
   2. **SP ACS**.

Now that you have your SP information, you can create a new Google Workspace app and enter that information during app creation:

1. Sign in to your Google Workspace Admin Console.
2. From the hamburger menu, click **Apps \> Web and mobile apps**.
3. Click **Add app \> Add custom SAML app**.
4. Enter the app’s name, description, and icon, then click **Continue**.
5. Click **DOWNLOAD METADATA** under **Option 1: Download IdP metadata**.
6. Save the XML file to use in step 2 below and click **Continue**.
7. Use the SP information from Access Server to enter the following into the Google app:
   - **ACS URL:** Enter the Access Server **SP ACS**.
   - **Entity ID:** Enter the Access Server **SP Identity**.
   - **Start URL:** Enter ‘cws’ for the Client Web UI or ‘profile’ to provide users with a downloadable profile. (See "How to set up IdP-initiated flow" below for more details.)
   - Click **Continue**.
8. Configure attribute mapping (such as “Primary email” = “email”) on the next screen and click **Finish**.

## Step 2: Upload metadata XML file to Access Server

The simplest way to set up Google Workspace SAML for Access Server is to provide the metadata to Access Server. You can do this with the downloaded metadata XML file from when you created your app.

Provide the file to your Access Server through the Admin Web UI:

1. Sign in to your Access Server Admin Web UI.
2. Click **Authentication \> SAML**.
3. Click **Configure Identity Provider (IdP) Automatically via Metadata** to expand the

   section.
4. Click **Choose File** for **Select IdP Metadata File**.
5. Select your **Google IdP metadata XML file**, click **Upload**, and click **Update Running Server**.
   - The IdP fields are now populated under **Configure Identity Provider (IdP) Manually**.

## Step 3: Turn on the SAML service for users

You need to grant access to your SAML app from the Google Workspace admin console:

1. Sign in to the Google Workspace admin console.
2. Click **Apps \> Web and mobile apps**.
3. Click your SAML app.
4. Click **User access**.
5. Select **ON for everyone** and click **Save**.

## Step 4: Assign SAML as user authentication

Once you’ve provided the SAML configuration for your IdP, you can enable it for users.

1. Sign in to the Admin Web UI.
2. Select **Authentication → SAML**.
3. Select the toggle to turn on **Enable SAML authentication**.
4. Select **Save Settings** and **Update Running Server**.

You can now enable SAML as the [global default authentication](https://openvpn.net/as-docs/tutorials/saml-default-auth.md) or for [specific groups and users](https://openvpn.net/as-docs/tutorials/saml-users-groups.md).

## Optional: How to set up IdP-initiated flow

You can configure an IdP-initiated flow for signing into Access Server from Google Workspace with the following steps:

1. Sign in to the Google Workspace admin console.
2. Click **Apps \> Web and mobile apps**, and click on your custom SAML app.
3. Click the arrow to expand **Service provider details**.
4. Add one of the following to **Start URL**:
   1. **cws:** This directs your users to the Client Web UI after sign-in.
   2. **profile:** This directs your users to a profile download after sign-in.
5. Click **Save**.
   - Users find the app available in their Google apps.

## Optional: Map group access control

You can automate group assignments for access control rules using a post-authentication Python script.

Refer to the steps in this tutorial:

- [Tutorial: How to Set Up SAML Group Mapping with a Post-Auth Script](https://openvpn.net/as-docs/tutorials/tutorial--post-auth-saml-group-mapping.md)

## How to manually configure SAML for Google Workspace

If you prefer, you can manually enter the Google Workspace SAML data to configure Access Server by following these steps.

### Step 1: Create the Google Workspace custom SAML app.

First, gather information about your Access Server as the service provider (SP).

1. Sign in to your Access Server Admin Web UI.
2. Select **Authentication → SAML**.
3. You'll need the following information:
   1. **SP Identity**.
   2. **SP ACS**.

Now that you have your SP information, you can create a new Google Workspace app and enter that information during app creation

1. Sign in to your Google Workspace Admin Console.
2. From the hamburger menu, click **Apps \> Web and mobile apps**.
3. Click **Add app \> Add custom SAML app**.
4. Enter the app’s name, description, and icon, then click **Continue**.
5. Save the **SSO URL**, **Entity ID**, and **Certificate** information under **Option 2: Copy the SSO URL, entity ID, and certificate**.
6. Click **Continue**.
7. Use the SP information from Access Server to enter the following into the Google app:
   1. **ACS URL:** Enter the Access Server **SP ACS**.
   2. **Entity ID:** Enter the Access Server **SP Identity**.
   3. **Start URL:** Enter ‘cws’ for the Client Web UI or ‘profile’ to provide users with a downloadable profile. (See “How to set up IdP-initiated flow” for more details.)
   4. Click **Continue**.
8. Configure attribute mapping (such as “Primary email” = “email”) on the next screen and click **Finish**.

### Step 2: Manually enter the IdP data into Access Server’s SAML page.

1. Sign in to your Access Server Admin Web UI.
2. Click **Authentication \> SAML**.
3. Click **Configure Identity Provider (IdP) Manually** to expand the section.
4. Enter the following from the Google Workspace SAML app:
   1. **IdP EntityID:** Paste the Google Workspace SAML app **entity ID**.
   2. **Sign-on Endpoint:** Paste the Google Workspace SAML app **SSO URL**.
   3. **Certificate (PEM format):** Paste the Google Workspace SAML app **certificate**.
5. Select **Save Settings** and **Update Running Server**.

---

Prev: [Tutorial: How to Configure SAML with Entra ID](https://openvpn.net/as-docs/tutorials/saml-entra-id.md)
Next: [Tutorial: How to Configure SAML with OneLogin](https://openvpn.net/as-docs/tutorials/saml-onelogin.md)
Index: https://openvpn.net/as-docs/llms.txt
