Stay organized with collections
Save and categorize content based on your preferences.
To enforce data source access control and secure data in
Agentspace, you must configure an identity provider. This involves
setting up the identity provider and managing permissions for your data sources.
Google uses your identity provider to identify the end user performing a search
and determine if they have access to the documents that are returned as results.
Choose your identity provider type
The type of the identity provider you choose, depends on the data sources connected to your
Agentspace app. Agentspace supports
the following options:
Before configuring Google identity, you must determine the unique user
attribute used by your organization, typically the user's email.
If users have more than one email address, you must add an email alias.
Third-party identity provider
When you only connect Agentspace to third-party data sources,
and you are already using a third-party identity provider that supports
OIDC or SAML 2.0, such as Microsoft Entra ID, Active Directory Federation
Services (AD FS), Okta, and others, you must use Workforce Identity Federation.
For more information, see
Workforce Identity Federation.
Before configuring Workforce Identity Federation, you must determine the
unique user attributes used by your organization, and these attributes
must be mapped with Workforce Identity Federation.
Workforce Identity Federation for third-party identity providers
This section describes how to configure Workforce Identity Federation for
third-party identity providers. Optionally, you can verify if the
Workforce Identity Federation set up works as expected.
Configure Workforce Identity Federation
For details on configuring Workforce Identity Federation with your third-party
identity connector, see the following resources:
Attribute mapping helps you connect your third-party identity information with
Google using Workforce Identity Federation.
When configuring attribute mapping in Workforce Identity Federation, consider the
following:
The google.subject attribute must map to the field that uniquely identifies
end-users in third-party data sources. For example, email, principal name,
user ID, or employee ID.
If your organization has more than one unique identifier, map these unique
organizational attributes using the
attribute.as_user_identifier_number between 1 and 50
attribute.
For example, if your organization uses both email and principal name
as user identifiers across different applications, and the principal name is
set as the preferred_username in your third-party identity provider, you
can map it to Agentspace using the Workforce Identity Federation
attribute mapping (for example,
attribute.as_user_identifier_1=assertion.preferred_username).
The following are example google.subject and google.groups attribute
mappings for commonly used identity providers.
Enable detailed logging in your workforce pool. The
Workforce Identity Federation extended groups feature for Microsoft Entra
ID doesn't produce detailed audit logging information.
On the audit log page clear the protoPayload.resourceName filter from the query.
Click Run query.
Check the audit logs for an entry with the google.identity.sts.SecurityTokenService.WebSignIn
method that matches the sign-in timestamp.
Confirm that the metadata.mapped_attributes field in the log matches the
attribute that you used when configuring Workforce Identity Federation for
third-party identity providers.
When connecting your data sources using a connector to create data stores,
the following limitations apply:
3000 readers are allowed per document. Each principal counts as a reader, where
a principal can be a group or an individual user.
You can select one identity provider type per location supported in
Agentspace.
If the identity provider settings are updated by changing the identity
provider type or the workforce pool, existing data stores won't automatically
update to the new settings. You must delete and recreate these data stores to
apply the new identity settings.
To set a data source as access-controlled, you must select this setting during
data store creation. You can't turn this setting on or off for an existing
data store.
To preview UI results for search apps that use third-party access
control, you must sign in to the federated console or use the web app.
See Preview your app.
Connect to your identity provider
The following section describes how to connect to your identity provider using
Google Cloud console.
Before you begin
Before connecting the identity provider, do the following:
Click Add identity provider for the location you want to update.
Click Add identity provider and select your identity provider type.
If you select 3rd party identity, you also need to select the workforce
pool that applies for your data sources.
Click Save changes.
Grant permissions to users
Users need the Discovery Engine User (roles/discoveryengine.user) role to access, manage, and
share apps.
Identity provider type
Description
Google Identity
If you use Google Identity, Google recommends
creating a Google group
that includes all employees who use the app.
If you're a Google Workspace
administrator, you can include all users in an organization to a
Google group by following the steps in
Add all your organization's users to a
group.
Grant the Discovery Engine User (roles/discoveryengine.user) role to users. For more
information on adding the role, see
Grant permissions to your users.
When you are ready to share the app with your users, you can turn on the app
and share the URL with your user. Users need to sign in before they can
access the app. For more information, see
View the search web app.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[],[],null,["# Configure identity provider\n\nTo enforce data source access control and secure data in\nAgentspace, you must configure an identity provider. This involves\nsetting up the identity provider and managing permissions for your data sources.\nGoogle uses your identity provider to identify the end user performing a search\nand determine if they have access to the documents that are returned as results.\n\nChoose your identity provider type\n----------------------------------\n\nThe type of the identity provider you choose, depends on the data sources connected to your\nAgentspace app. Agentspace supports\nthe following options:\n\nWorkforce Identity Federation for third-party identity providers\n----------------------------------------------------------------\n\nThis section describes how to configure Workforce Identity Federation for\nthird-party identity providers. Optionally, you can verify if the\nWorkforce Identity Federation set up works as expected.\n| **Important:** The workforce identity pool admin roles give the administrators powerful permissions. For more information, see [Workforce Identity Federation and pool administrators](/agentspace/docs/security-overview#pool-admins).\n\n### Configure Workforce Identity Federation\n\nFor details on configuring Workforce Identity Federation with your third-party\nidentity connector, see the following resources:\n\n#### Configure attribute mapping\n\nAttribute mapping helps you connect your third-party identity information with\nGoogle using Workforce Identity Federation.\n\nWhen configuring attribute mapping in Workforce Identity Federation, consider the\nfollowing:\n\n- The `google.subject` attribute must map to the field that uniquely identifies\n end-users in third-party data sources. For example, email, principal name,\n user ID, or employee ID.\n\n- If your organization has more than one unique identifier, map these unique\n organizational attributes using the\n `attribute.as_user_identifier_`\u003cvar class=\"edit\" translate=\"no\"\u003enumber between 1 and 50\u003c/var\u003e\n attribute.\n\n For example, if your organization uses both email and principal name\n as user identifiers across different applications, and the principal name is\n set as the `preferred_username` in your third-party identity provider, you\n can map it to Agentspace using the Workforce Identity Federation\n attribute mapping (for example,\n `attribute.as_user_identifier_1=assertion.preferred_username`).\n\nThe following are example `google.subject` and `google.groups` attribute\nmappings for commonly used identity providers.\n\n- [Entra ID with OIDC protocol](/iam/docs/workforce-sign-in-azure-ad#create-oidc-provider)\n\n This example uses the email to uniquely identify users.\n\n google.subject=assertion.email\n google.groups=assertion.groups\n google.display_name=assertion.given_name\n\n- [Entra ID with SAML protocol](/iam/docs/workforce-sign-in-azure-ad#create-saml-provider)\n\n This example uses the SAML name ID to uniquely identify users.\n\n google.subject=assertion.attributes['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'][0]\n google.groups=assertion.attributes['http://schemas.microsoft.com/ws/2008/06/identity/claims/groups']\n google.display_name=assertion.attributes['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname'][0]\n\n- [Okta with OIDC protocol](/iam/docs/workforce-sign-in-okta#create-oidc-provider)\n\n This example uses the email to uniquely identify users.\n\n google.subject=assertion.email\n google.groups=assertion.groups\n\n- [Okta with SAML protocol](/iam/docs/workforce-sign-in-okta#create-saml-provider)\n\n This example uses the subject assertion of the JWT to uniquely identify\n users.\n\n google.subject=assertion.subject\n google.groups=assertion.attributes['groups']\n\n### Optional: Verify Workforce Identity Federation setup\n\nTo verify successful sign-ins and correct attribute mapping using the\nWorkforce Identity Federation audit logging feature, do the following:\n\n1. Enable audit logs for the Data Access activity's Security Token Service API.\n\n 1. In the Google Cloud console, go to the **Audit Logs** page:\n\n [Go to **Audit Logs**](https://console.cloud.google.com/iam-admin/audit)\n\n \u003cbr /\u003e\n\n If you use the search bar to find this page, then select the result whose subheading is\n **IAM \\& Admin**.\n 2. Select an existing Google Cloud project, folder, or organization.\n 3. Enable the Data Access audit logs.\n 1. See the Logging documentation for detailed steps on how to [Enable audit logs](/logging/docs/audit/configure-data-access#config-console-enable).\n 2. For the **Security Token Service API** , select the **Admin Read** audit log type. For more information, see [Example logs for Workforce Identity Federation](/iam/docs/audit-logging/examples-workforce-identity).\n2. Enable detailed logging in your workforce pool. The\n Workforce Identity Federation extended groups feature for Microsoft Entra\n ID doesn't produce detailed audit logging information.\n\n 1. Go to the **Workforce Identity Pools** page:\n\n [Go to Workforce Identity Pools](https://console.cloud.google.com/iam-admin/workforce-identity-pools)\n 2. In the table, select the pool.\n\n 3. Click the **Enable detailed audit logging** toggle to the on position.\n\n 4. Click **Save Pool**.\n\n3. In the **Providers** section, click the **Sign in URL** for your provider,\n and sign in to Google Cloud console as a workforce pool user.\n\n \u003cbr /\u003e\n\n4. See the audit logs that generated when you signed in.\n\n 1. Go to the **Workforce Identity Pools** page:\n\n [Go to Workforce Identity Pools](https://console.cloud.google.com/iam-admin/workforce-identity-pools)\n 2. In the table, select the pool you signed into.\n\n 3. Click **View** next to **Logs**.\n\n 4. On the audit log page clear the `protoPayload.resourceName` filter from the query.\n\n 5. Click **Run query**.\n\n5. Check the audit logs for an entry with the `google.identity.sts.SecurityTokenService.WebSignIn`\n method that matches the sign-in timestamp.\n\n6. Confirm that the `metadata.mapped_attributes` field in the log matches the\n attribute that you used when configuring Workforce Identity Federation for\n third-party identity providers.\n\n For example: \n\n \"metadata\": {\n \"mapped_attributes\": {\n \"attributes.as_user_identifier_1\": \"alex@admin.altostrat.com\"\n \"google.subject\": \"alex@altostrat.com\"\n \"google.groups\": \"[123abc-456d, efg-h789-ijk]\"\n }\n },\n\nLimitations\n-----------\n\nWhen connecting your data sources using a connector to create data stores,\nthe following limitations apply:\n\n- 3000 readers are allowed per document. Each principal counts as a reader, where\n a principal can be a group or an individual user.\n\n- You can select one identity provider type per location supported in\n Agentspace.\n\n- If the identity provider settings are updated by changing the identity\n provider type or the workforce pool, existing data stores won't automatically\n update to the new settings. You must delete and recreate these data stores to\n apply the new identity settings.\n\n- To set a data source as access-controlled, you must select this setting during\n data store creation. You can't turn this setting on or off for an existing\n data store.\n\n- To preview UI results for search apps that use third-party access\n control, you must sign in to the federated console or use the web app.\n See [Preview your app](/agentspace/docs/quickstart-agentspace#preview_your_app).\n\nConnect to your identity provider\n---------------------------------\n\nThe following section describes how to connect to your identity provider using\nGoogle Cloud console.\n\n#### Before you begin\n\nBefore connecting the identity provider, do the following:\n\n- [Grant permissions to admins](/agentspace/docs/access-control#grant_permissions_to_admins).\n\n- If you are connecting a third-party identity provider,\n configure Workforce Identity Federation.\n\n#### Connect identity provider\n\nTo specify an identity provider for Agentspace and turn on data\nsource access control, follow these steps:\n\n1. In the Google Cloud console, go to the **Agentspace** page.\n\n [Agentspace](https://console.cloud.google.com/gen-app-builder/engines)\n2. Click **Settings** \\\u003e **Authentication**.\n\n3. Click **Add identity provider** for the location you want to update.\n\n4. Click **Add identity provider** and select your identity provider type.\n\n If you select **3rd party identity**, you also need to select the workforce\n pool that applies for your data sources.\n\n \u003cbr /\u003e\n\n5. Click **Save changes**.\n\n\u003e | **Note:** If the identity provider settings are updated by changing the identity provider type or the workforce pool, existing data stores won't automatically update to the new settings. You must delete and recreate these data stores to apply the new identity settings.\n\nGrant permissions to users\n--------------------------\n\nUsers need the Discovery Engine User (`roles/discoveryengine.user`) role to access, manage, and\nshare apps.\n\nWhat's next?\n------------\n\n- If you have Cloud Storage or BigQuery data stores and you want to\n enforce access control on the data, then you must\n [configure access controls for custom data sources](/agentspace/docs/identity).\n\n- If you connect to your own custom data source, learn how you can\n [set up external identities](/agentspace/docs/identity-mapping).\n\n- [Preview your app](/agentspace/docs/quickstart-agentspace#preview_your_app).\n\n- When you are ready to share the app with your users, you can turn on the app\n and share the URL with your user. Users need to sign in before they can\n access the app. For more information, see\n [View the search web app](/agentspace/docs/quickstart-agentspace#view_the_search_web_app)."]]