Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Cloud Organization
  • Getting started
    • All tutorials
    • Differentiation of access permissions for user groups
      • Overview
      • Authentication using Active Directory
      • Authentication using Google Workspace
      • Authentication using Microsoft Entra ID
      • Authentication using Keycloak
    • Service account with an OS Login profile for VM management via Ansible
  • Access management
  • Pricing policy
  • Terraform reference
  • Audit Trails events
  • Release notes

In this article:

  • Getting started
  • Creating and setting up a SAML application in Google Workspace
  • Create a SAML application and download a certificate
  • Creating and setting up a federation in Yandex Cloud Organization
  • Create a federation
  • Add certificates
  • Setting up single sign-on (SSO)
  • Specify the redirect URL
  • Add users
  • Mapping user attributes
  • Add users to your organization
  • Authentication
  1. Tutorials
  2. Managing identity federations
  3. Authentication using Google Workspace

Authentication using Google Workspace

Written by
Yandex Cloud
Updated at May 5, 2025
  • Getting started
  • Creating and setting up a SAML application in Google Workspace
    • Create a SAML application and download a certificate
  • Creating and setting up a federation in Yandex Cloud Organization
    • Create a federation
    • Add certificates
  • Setting up single sign-on (SSO)
    • Specify the redirect URL
    • Add users
    • Mapping user attributes
    • Add users to your organization
  • Authentication

With an identity federation, you can use Google Workspace to authenticate users in an organization.

Authentication setup includes the following steps:

  1. Creating and setting up a SAML application in Google Workspace.
  2. Creating and setting up a federation in Yandex Cloud Organization.
  3. Setting up single sign-on (SSO).
  4. Authentication.

Getting startedGetting started

To follow the steps described in this section, you will need a subscription to Google Workspace services and a verified domain to set up your SAML application for.

Creating and setting up a SAML application in Google WorkspaceCreating and setting up a SAML application in Google Workspace

Create a SAML application and download a certificateCreate a SAML application and download a certificate

A SAML application in Google Workspace acts as an identity provider (IdP). Create a SAML application and download a certificate:

  1. Open the Google Workspace Admin Console.

  2. In the left-hand panel, select Mobile and web applications.

  3. Click Add → Add a custom SAML app.

  4. Enter the name of the app, select the logo, and click Continue.

  5. In the Google IdP information step, the IdP server data is shown. You will need this data when setting up a federation in Yandex Cloud Organization.

Alert

Do not close the page where you create an app in Google Workspace: you will get the required configuration data for the Service provider information step in further steps.

Creating and setting up a federation in Yandex Cloud OrganizationCreating and setting up a federation in Yandex Cloud Organization

Create a federationCreate a federation

To create a federation:

Cloud Center interface
CLI
Terraform
API
  1. Go to Yandex Cloud Organization.

  2. In the left-hand panel, select Federations.

  3. Click Create federation in the top-right corner of the page. In the window that opens:

    1. Give your federation a name. It must be unique within the folder.

    2. You can also add a description, if required.

    3. In the Cookie lifetime field, specify the time before the browser asks the user to re-authenticate.

    4. In the IdP Issuer field, enter the link from the Object ID field on the Google Workspace Google IdP information page. The link should have the following format:

      https://accounts.google.com/o/saml2?idpid=<SAML_app_ID>
      
    5. In the Link to the IdP login page field, paste the link copied from the SSO URL field on the Google Workspace Google IdP information page. The link should have the following format:

      https://accounts.google.com/o/saml2/idp?idpid=<SAML_app_ID>
      

      You can only use HTTP and HTTPS in a link.

    6. Enable Automatically create users to add authenticated users to your organization automatically. If you do not enable this option, you will need to manually add your federated users.

      A federated user is created automatically only when they log in to a cloud for the first time. If you removed a user from the federation, you can only add them back manually.

    7. Enable Mandatory re-authentication (ForceAuthn) in IdP to set ForceAuthn to true in the SAML authentication request. If enabled, the IdP will request the user to re-authenticate once the Yandex Cloud session expires.

    8. Click Create federation.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

  1. View the description of the create federation command:

    yc organization-manager federation saml create --help
    
  2. Create a federation:

    yc organization-manager federation saml create --name my-federation \
      --organization-id <organization_ID> \
      --auto-create-account-on-login \
      --cookie-max-age 12h \
      --issuer "https://accounts.google.com/o/saml2?idpid=<SAML_app_ID>" \
      --sso-url "https://accounts.google.com/o/saml2/idp?idpid=<SAML_app_ID>" \
      --sso-binding POST \
      --force-authn
    

    Where:

    • --name: Federation name. It must be unique within the folder.

    • --organization-id: Organization ID.

    • --auto-create-account-on-login: Flag enabling the automatic creation of new cloud users after authenticating on the IdP server.
      This option makes it easier to create users; however, users created this way will not be able to do anything with cloud resources. This does not apply to the resources for which roles are assigned to the All users or All authenticated users public group.

      If this option is off, users not added to the organization will not be able to log in to the management console, even if authenticated on your server. In this case, you can manage a list of users allowed to use Yandex Cloud resources.

    • --cookie-max-age: Time before the browser asks the user to re-authenticate.

    • --issuer: ID of the IdP server to use for authentication.

      Use the link provided in the Object ID field on the Google IdP information page in Google Workspace. This is a link in the format:

      https://accounts.google.com/o/saml2?idpid=<SAML_app_ID>
      
    • --sso-url: URL of the page the browser has to redirect the user to for authentication.

      Use the link from the SSO URL field on the Google Workspace Google IdP information page. The link should have the following format:

      https://accounts.google.com/o/saml2/idp?idpid=<SAML_app_ID>
      

      You can only use HTTP and HTTPS in a link.

    • --sso-binding: Specify the single sign-on binding type. Most identity providers support the POST binding type.

    • (Optional) --force-authn: When the Yandex Cloud session expires, your IdP will prompt the user to re-authenticate.

If you do not have Terraform yet, install it and configure its Yandex Cloud provider.

  1. Specify the federation parameters in the configuration file.

    Here is the configuration file example:

    resource "yandex_organizationmanager_saml_federation" federation {
      name            = "my-federation"
      organization_id = "<organization_ID>"
      auto_create_account_on_login = "true"
      issuer          = "https://accounts.google.com/o/saml2?idpid=<SAML_app_ID>"
      sso_url         = "https://accounts.google.com/o/saml2/idp?idpid=<SAML_app_ID>"
      sso_binding     = "POST"
      security_settings {
        encrypted_assertions = "true"
      }
    }
    

    Where:

    • name: Federation name. It must be unique within the folder.

    • description: Federation description.

    • organization_id: Organization ID.

    • labels: Set of key/value label pairs assigned to the federation.

    • issuer: ID of the IdP server to use for authentication.

      Use the link from the Object ID field on the Google Workspace Google IdP information page. The link should have the following format:

      https://accounts.google.com/o/saml2?idpid=<SAML_app_ID>
      
    • sso_binding: Specify the single sign-on binding type. Most identity providers support the POST binding type.

    • sso_url: URL of the page the browser has to redirect the user to for authentication.

      Use this as the destination when copying the link from the SSO URL field on the Google Workspace Google IdP information page. The link should have the following format:

      https://accounts.google.com/o/saml2/idp?idpid=<SAML_app_ID>
      

      You can only use HTTP and HTTPS in a link.

    • cookie_max_age: Time in seconds before the browser asks the user to re-authenticate. The default value is 8 hours.

    • auto_create_account_on_login: Flag enabling the automatic creation of new cloud users after authenticating on the IdP server.
      This option makes it easier to create users; however, users created this way will not be able to do anything with cloud resources. This does not apply to the resources for which roles are assigned to the All users or All authenticated users public group.

      If this option is off, users not added to the organization will not be able to log in to the management console, even if authenticated on your server. In this case, you can manage a list of users allowed to use Yandex Cloud resources.

    • case_insensitive_name_ids: Toggles username case sensitivity.
      If this option is enabled, the IDs of federated user names will be case-insensitive.

    • security_settings: Federation security settings:

      • encrypted_assertions: Sign authentication requests.

        If this option is enabled, all authentication requests from Yandex Cloud will have a digital signature.

      • force-authn: When the Yandex Cloud session expires, your IdP will prompt the user to re-authenticate. This is an optional parameter.

    For more information about the yandex_organizationmanager_saml_federation resource parameters, see the provider documentation.

  2. Make sure the configuration files are correct.

    1. In the command line, go to the directory where you created the configuration file.

    2. Run a check using this command:

      terraform plan
      

    If the configuration is described correctly, the terminal displays the federation parameters. If the configuration contains any errors, Terraform will point them out.

  3. Create a federation.

    1. If the configuration does not contain any errors, run this command:

      terraform apply
      
    2. Confirm you want to create a federation.

    This will create a federation in the specified organization. You can check the new federation and its settings in the organization's Federations section.

  1. Create a file with the request body, e.g., body.json:

    {
      "name": "my-federation",
      "organizationId": "<organization_ID>",
      "autoCreateAccountOnLogin": true,
      "cookieMaxAge":"43200s",
      "issuer": "https://accounts.google.com/o/saml2?idpid=<SAML_app_ID>",
      "ssoUrl": "https://accounts.google.com/o/saml2/idp?idpid=<SAML_app_ID>",
      "ssoBinding": "POST",
      "securitySettings": {
        "forceAuthn": true
      }
    }
    

    Where:

    • name: Federation name. It must be unique within the folder.

    • organizationId: Organization ID.

    • autoCreateAccountOnLogin: Flag enabling the automatic creation of new cloud users after authenticating on the IdP server.
      This option makes it easier to create users; however, users created this way will not be able to do anything with cloud resources. This does not apply to the resources for which roles are assigned to the All users or All authenticated users public group.

      If this option is off, users not added to the organization will not be able to log in to the management console, even if authenticated on your server. In this case, you can manage a list of users allowed to use Yandex Cloud resources.

    • cookieMaxAge: Time before the browser asks the user to re-authenticate.

    • issuer: ID of the IdP server to use for authentication.

      Use the link from the Object ID field on the Google Workspace Google IdP information page. The link should have the following format:

      https://accounts.google.com/o/saml2?idpid=<SAML_app_ID>
      
    • ssoUrl: URL of the page the browser has to redirect the user to for authentication.

      Use this as the destination when copying the link from the SSO URL field on the Google Workspace Google IdP information page. The link should have the following format:

      https://accounts.google.com/o/saml2/idp?idpid=<SAML_app_ID>
      

      You can only use HTTP and HTTPS in a link.

    • ssoBinding: Specify the single sign-on binding type. Most identity providers support the POST binding type.

    • forceAuthn: Parameter that requires user re-authentication once a session expires in Yandex Cloud.

  2. To create a federation, use the create REST API method for the Federation resource or the FederationService/Create gRPC API call and provide a file with the query parameters in your query.

    Query example:

    curl \
      --request POST \
      --header "Content-Type: application/json" \
      --header "Authorization: Bearer <IAM_token>" \
      --data '@body.json' \
      https://organization-manager.api.cloud.yandex.net/organization-manager/v1/saml/federations
    

    Response example:

    {
     "done": true,
     "metadata": {
      "@type": "type.googleapis.com/yandex.cloud.organization-manager.v1.saml.CreateFederationMetadata",
      "federationId": "ajeobmje4dgj********"
     }
    

    The federationId property contains the ID of the federation you created. Save it for later use.

Add certificatesAdd certificates

While authenticating, the Cloud Organization service should be able to verify the IdP server certificate. To enable this, download a certificate from the open Google Workspace Google IdP Information page and add it to the created federation:

Cloud Center interface
CLI
API
  1. Log in to Yandex Cloud Organization.

  2. In the left-hand panel, select Federations.

  3. Click the row with the federation you want to add a certificate to.

  4. Click Adding a certificate under Certificates at the bottom of the page.

  5. Enter certificate name and description.

  6. Choose how to add a certificate:

    • To add a certificate as a file, click Choose a file and specify the path to it.
    • To paste the contents of a copied certificate, select the Text method and paste the contents.
  7. Click Add.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

  1. View the description of the add certificate command:

    yc organization-manager federation saml certificate create --help
    
  2. Add a federation certificate by specifying the certificate file path:

    yc organization-manager federation saml certificate create --federation-id <federation_ID> \
      --name "my-certificate" \
      --certificate-file certificate.pem
    

Use the create method for the Certificate resource:

  1. Create a request body. In the data property, specify the contents of the certificate:

    {
      "federationId": "<federation_ID>",
      "name": "my-certificate",
      "data": "-----BEGIN CERTIFICATE..."
    }
    
  2. Send the request to add the certificate:

    export IAM_TOKEN=CggaAT********
    curl \
      --request POST \
      --header "Content-Type: application/json" \
      --header "Authorization: Bearer ${IAM_TOKEN}" \
      --data '@body.json' \
      "https://organization-manager.api.cloud.yandex.net/organization-manager/v1/saml/certificates"
    

Tip

Make sure to reissue certificates and add them to a federation in a timely manner.

To keep track of when your certificate expires, subscribe to notifications from the organization. Subscribed users get notifications 60, 30, and 5 days before the certificate expires and after its expiration.

Setting up single sign-on (SSO)Setting up single sign-on (SSO)

Specify the redirect URLSpecify the redirect URL

Once you have created a federation, complete the creation of the SAML application in Google Workspace:

  1. Go back to the SAML app creation page's Google IdP information step and click Continue.

  2. In the Service provider information step, specify information about Yandex Cloud that acts as a service provider:

    • In the ACS URL and Object ID fields, enter the ACS URL to redirect users to after successful authentication.

      How to get a federation ID
      1. Log in to Yandex Cloud Organization.
      2. In the left-hand panel, select Federations.
      3. Select the required federation and copy the Identifier field value on the federation info page.
      How to get the federation ACS URL
      1. Log in to Yandex Cloud Organization.

      2. In the left-hand panel, select Federations.

      3. Select the required federation and copy the ACS URL field value on the federation info page.

    • Enable Signed Response.

  3. Click Continue.

    Tip

    To enable the user to contact Yandex Cloud technical support from the management console, in the Mapping attributes step, click Add new mappings and configure the provision of attributes:

    • Primary email.
    • First name.
    • Last name.

    User attributes supported by the Yandex Cloud Organization services are listed in the User attributes mapping section.

  4. To complete the creation of the app, click Ready.

Add usersAdd users

  1. On the app page, under User access, click Disabled for everyone.

  2. In the page that opens, select who can authenticate with this identity federation:

    • To enable access for all federation users, select ON for everyone.

    • To enable access for an individual organizational unit, select the unit from the list on the left and configure the service status for this unit. The child units inherit access settings from the parent units by default.

  3. Click Save.

Mapping user attributesMapping user attributes

User data Comment Application Attributes
Unique user ID Required attribute. Using an email address is recommended. Name ID field in service provider settings
Surname Displayed in Yandex Cloud services.
Value length limit: 64 characters.
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname
Name Displayed in Yandex Cloud services.
Value length limit: 64 characters.
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname
Full name Displayed in Yandex Cloud services.
Example: Ivan Ivanov.
Value length limit: 64 characters.
Attribute unavailable
Email Used to send notifications from Yandex Cloud services.
Example: ivanov@example.com.
Value length limit: 256 characters.
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress
Phone Used to send notifications from Yandex Cloud services.
Example: +71234567890.
Value length limit: 64 characters.
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/mobilephone
Profile image Displayed in Yandex Cloud services.
Value length limit: 204,800 characters.
Attribute unavailable

Warning

The thumbnailPhoto attribute value exceeding the length limit is ignored. If the value of a different attribute exceeds the limit, the value part that goes beyond the limit is truncated.

Attribute mapping example:

image

Add users to your organizationAdd users to your organization

If you did not enable the Automatically create users option when creating the federation, you will have to add federated users to your organization manually.

To do this, you will need user name IDs. They are returned by the IdP server together with a response confirming successful authentication.

If the Automatically create users option is enabled, a federation will only add users logging in to a cloud for the first time. If a federated user has been removed, they can only be added again manually.

A user can be added by the organization administrator (the organization-manager.admin role) or owner (the organization-manager.organizations.owner role). To learn how to grant a role to a user, see Roles.

Note

To enable a user to access the management console, assign them a role for the cloud or organization. For added security, you can assign one of the least priveleged roles, such as resource-manager.clouds.member. However, you may also assign other roles if you know which permissions you want to grant to the invited users.

To grant these permissions to all the organization users at once, assign the role to the All users in organization X system group. When using the CLI or API, no additional roles are required.

Cloud Center interface
CLI
API
  1. Go to Yandex Cloud Organization.

  2. In the left-hand panel, select Users.

  3. In the top-right corner, click More and select Add federated users.

  4. Select the identity federation to add users from.

  5. List the name IDs of users, separating them with spaces or line breaks.

  6. Click Add. This will give the users access to the organization.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

  1. View the description of the add user command:

    yc organization-manager federation saml add-user-accounts --help
    
  2. Add users by listing their name IDs separated by a comma:

    yc organization-manager federation saml add-user-accounts --id <federation_ID> \
      --name-ids=alice@example.com,bob@example.com,charlie@example.com
    

    Where:

    • --id: Federation ID.
    • --name-ids: Name IDs of users.

To add identity federation users to the cloud:

  1. Create a file with the request body, e.g., body.json. In the request body, specify the array of name IDs of users you want to add:

    {
      "nameIds": [
        "alice@example.com",
        "bob@example.com",
        "charlie@example.com"
      ]
    }
    
  2. Send the request by specifying the federation ID in the parameters:

    curl \
      --request POST \
      --header "Content-Type: application/json" \
      --header "Authorization: Bearer <IAM_token>" \
      --data '@body.json' \
      https://organization-manager.api.cloud.yandex.net/organization-manager/v1/saml/federations/<federation_ID>:addUserAccounts
    

AuthenticationAuthentication

When you finish configuring the server, test that everything works properly:

  1. Open your browser in guest or private browsing mode.

  2. Use this URL to log in to the management console:

    https://console.yandex.cloud/federations/<federation_ID>
    
    How to get a federation ID
    1. Log in to Yandex Cloud Organization.
    2. In the left-hand panel, select Federations.
    3. Select the required federation and copy the Identifier field value on the federation info page.

    The browser will forward you to the Google authentication page.

  3. Enter your credentials and click Sign in.

On successful authentication, the IdP server will redirect you back to the ACS URL you specified in the Google Workspace settings and then to the management console home page. In the top-right corner, you can see that you are logged in to the console as a federated user.

What's nextWhat's next

  • Assign roles to the new users.

Was the article helpful?

Previous
Authentication using Active Directory
Next
Authentication using Microsoft Entra ID
© 2025 Direct Cursus Technology L.L.C.