Configure Workforce Identity Federation with Microsoft Entra ID
Stay organized with collections
Save and categorize content based on your preferences.
You can configure Workforce Identity Federation with the Microsoft Entra ID
identity provider (IdP) and map up to 400 groups from
Microsoft Entra ID to Google Cloud by using Microsoft Graph. You can then
grant IAM roles to those groups, which allows Microsoft
Entra ID users that are members of the groups to sign into Google Cloud. The
users can then access Google Cloud products to which they were granted IAM access that also support Workforce Identity Federation.
This section describes concepts that are used to configure Workforce Identity Federation, later in this document.
Extra attributes
To map up to 400 groups, you use extra attributes by
specifying extra-attributes flags when you create the workforce identity
pool provider. You can use extra attributes with the following protocols:
OIDC with implicit flow
OIDC with code flow
SAML 2.0 protocol
The number of group email addresses that a Microsoft Entra ID application can
emit in a token is limited to 150 for SAML and 200 for JWT. To learn more about
this limit, see Configure group claims for applications by using Microsoft Entra ID.
To retrieve more groups, Workforce Identity Federation uses Microsoft
Identity's OAuth 2.0 client credentials flow
to obtain credentials that allow Workforce Identity Federation
to query the Microsoft Graph API and fetch a user's groups.
To use extra attributes, at a high level, you do the following:
Create a new Microsoft Entra ID application or update your existing
application to obtain users' group memberships from the Microsoft Graph API.
To learn more about how Microsoft Graph retrieves a large number of groups
from Microsoft Entra ID, see Group overages.
When you create the workforce identity pool provider, you use
extra-attributes flags to configure Workforce Identity Federation to
retrieve users' group email addresses or display names from the Microsoft Graph API.
Workforce Identity Federation can retrieve a maximum of 999 groups from the
Microsoft Graph API. If the Microsoft Graph API returns more than 999 groups,
the sign-in fails.
To reduce the number of groups that the Microsoft Graph API returns, you can
refine Workforce Identity Federation's query by using the
--extra-attributes-filter flag, when you create the workforce identity pool
provider.
After Workforce Identity Federation retrieves the groups from the Microsoft
Graph API, it mints the access token. Workforce Identity Federation can add a
maximum of 400 groups to the access token, so, to further filter the number of
groups to 400 or fewer, you can specify an attribute mapping
that contains common expression language (CEL) expressions, when you create the
workforce identity pool provider.
Before you begin
Make sure that you have a Google Cloud organization set up.
Install the Google Cloud CLI.
After installation,
initialize the Google Cloud CLI by running the following command:
All groups that you intend to map must be marked as security groups in
Microsoft Entra ID.
Costs
Workforce Identity Federation is available
as a no-cost feature. However, Workforce Identity Federation detailed audit logging uses Cloud Logging. To learn about Logging pricing,
see Google Cloud Observability pricing.
If you're configuring permissions in a development or test environment—but not a
production environment—you can grant the IAM Owner
(roles/owner) basic role, which also includes permissions for
Workforce Identity Federation.
Create a Microsoft Entra ID application
This section shows you how to create a Microsoft Entra ID application using the
Microsoft Entra admin portal. Alternatively, you can update your existing
application. For additional details, see Establish applications in the Microsoft Entra ID ecosystem.
Workforce identity pools support federation using both OIDC and SAML protocols.
Configure large numbers of groups with Microsoft Entra ID
This section describes how to map up to 400 groups from
Microsoft Entra ID to Workforce Identity Federation using the OIDC and SAML
protocols.
Configure large numbers of groups with Microsoft Entra ID with OIDC implicit flow
This section describes how to map up to 400 groups from
Microsoft Entra ID to Workforce Identity Federation using the OpenID Connect
(OIDC) protocol with implicit flow.
Configure your Microsoft Entra ID application
You can configure an existing Microsoft Entra ID application or create a new one. To configure your application, do
the following:
In the Microsoft Entra ID portal, do the following:
To update an existing application, do the following:
Go to the Overview page of your Microsoft Entra ID application
registration.
Navigate to Entra ID > App registrations.
Select the application that you want to update.
Create a new client secret in the application by following the instructions in Certificates & secrets. Make sure that you record the client secret value because it's displayed only once.
Note the following values from the application that you created or
updated. You provide the values when you configure the workforce identity
pool provider later in this document.
Client ID
Issuer URI
Client Secret
Tenant ID
To retrieve the Microsoft Entra ID groups, add the API permission to let Workforce Identity Federation access users' information from Microsoft Entra ID using the Microsoft Graph API and grant admin consent.
In Microsoft Entra ID, do the following:
Go to API permissions.
Click Add a Permission.
Select Microsoft API.
Select Application permissions.
In the search field, enter User.ReadBasic.All.
Click Add permissions.
You can retrieve the Microsoft Entra ID groups using a group object identifier (ID), a group email address for email-enabled groups, or a group display name.
If you choose to retrieve groups as group email addresses or display names, the next step is required.
To retrieve the Microsoft Entra ID groups as group email addresses or display names, do the following. If you retrieve groups as group object identifiers, skip this step.
Go to API permissions.
Click Add a Permission.
Select Microsoft API.
Select Application permissions.
In the search field, enter GroupMember.Read.All.
Click Add permissions.
Go to the Overview page of the Microsoft Entra ID application
that you created or updated earlier. Click Endpoints.
The issuer URI is the OIDC metadata document URI, omitting the path
/.well-known/openid-configuration.
For example, if the OIDC metadata document is
https://login.microsoftonline.com/d41ad248-019e-49e5-b3de-4bdfe1fapple/v2.0/.well-known/openid-configuration,
the issuer URI is https://login.microsoftonline.com/d41ad248-019e-49e5-b3de-4bdfe1fapple/v2.0/.
PROVIDER_ID: a unique provider ID.
The prefix gcp- is reserved and can't be used in a pool or
provider ID.
WORKFORCE_POOL_ID: the workforce pool ID.
DISPLAY_NAME: a display
name for the provider.
ISSUER_URI: the issuer URI from the Microsoft Entra
ID application that you created earlier in this document.
CLIENT_ID: the client ID from your Microsoft Entra ID application.
ATTRIBUTE_MAPPING: the mapping of attributes from
Microsoft Entra ID to Google Cloud.
If you use --extra-attributes flags to query groups from
Microsoft Entra ID, any google.groups mapping that uses
standard SAML or OIDC claims is ignored. For example, to map
groups and subject attributes from Microsoft
Entra ID, use the following attribute mapping:
EXTRA_ATTRIBUTES_ISSUER_URI: the issuer URI from
your Microsoft Entra ID application.
EXTRA_ATTRIBUTES_CLIENT_ID: the client ID from your
Microsoft Entra ID application.
EXTRA_ATTRIBUTES_CLIENT_SECRET: the extra client
secret from your Microsoft Entra ID application.
EXTRA_ATTRIBUTES_TYPE: use
azure-ad-groups-mail to retrieve the email addresses of the
groups. Use azure-ad-groups-id to retrieve the IDs of the
groups. Use azure-ad-groups-display-name to retrieve the
display names of the groups.
EXTRA_ATTRIBUTES_FILTER: Optional. A filter
expression that is used when querying the Microsoft Graph API for
groups. You can use this parameter to ensure that the number of groups
fetched from the IdP remains below the limit of 400 groups.
The following example fetches the groups that have the prefix sales in their email ID:
--extra-attributes-filter='"mail:sales"'
The following expression fetches groups with a display name that contains the string sales.
--extra-attributes-filter='"displayName:sales"'
Workforce Identity Federation detailed audit logging logs information received from your IdP to Logging. Detailed audit logging can help you troubleshoot your workforce identity pool provider configuration. To learn how to troubleshoot attribute mapping errors with detailed audit logging, see General attribute mapping errors. To learn about Logging pricing, see
Google Cloud Observability pricing.
To disable detailed audit logging for a workforce identity pool provider, omit the --detailed-audit-logging flag when you run gcloud iam workforce-pools providers create. To disable detailed audit logging, you can also update the provider.
Console
In the Google Cloud console, go to the Workforce Identity
Pools page:
In the Workforce Identity Pools table, select the pool for
which you want to create the provider.
In the Providers section, click
add
Add Provider.
In the Select a Provider vendor list, select your identity
provider (IdP).
If your IdP isn't listed, then select
Generic Identity Provider.
In Select an authentication protocol, select OpenID
Connect (OIDC).
In the Create a provider section, do the following:
In Name, enter the name for the provider.
In Description, enter the description for the provider.
In Issuer (URL), enter the issuer URI.
The OIDC issuer URI must be in a valid URI format and start with https; for example,
https://example.com/oidc.
In Client ID, enter the OIDC client ID that is registered
with your OIDC IdP; the ID must match the aud claim of the JWT that is
issued by your IdP.
To create a provider that is enabled, make sure Enable
provider is on.
Click Continue.
In the Share your provider information with IdP section, copy
the URL. In your IdP, configure this URL as the redirect URI, which
informs your IdP where to send the assertion token after logging in.
Click Continue.
In the Configure OIDC Web Sign-in section, do the
following:
In the Flow type list, select ID Token.
In the Assertion claims behavior list, ID token is
selected.
Click Continue.
In Configure provider, you can configure an attribute
mapping and an attribute condition. To create an attribute
mapping, do the following. You can provide either the IdP field
name or a CEL-formatted
expression that returns a string.
Required: In OIDC 1, enter the subject from the IdP— for
example, assertion.sub.
Optional: To add additional attribute mappings, do the following:
In the corresponding OIDC n field, enter the name
of the IdP-specific field to map, in CEL format.
To increase the number of groups, do the following:
Select Use Extra Attributes.
In the Extra Attributes Issuer URI field, enter the issuer URL.
In the Extra Attributes Client ID field, enter the client ID.
In the Extra Attributes Client Secret field, enter the client secret.
In the Extra Attributes Type list, select an attribute type for extra attributes.
In the Extra Attributes Filter field, enter a filter expression that is used when querying the Microsoft Graph API for groups.
To create an attribute condition, do the following:
Click Add condition.
In the Attribute Conditions field, enter a condition in CEL format—
for example, assertion.role == 'gcp-users'. This example condition ensures that only users with the role gcp-users can sign in using this provider.
To turn on detailed audit logging, in Detailed logging,
click the Enable attribute value audit logging toggle.
Workforce Identity Federation detailed audit logging logs information received from your IdP to Logging. Detailed audit logging can help you troubleshoot your workforce identity pool provider configuration. To learn how to troubleshoot attribute mapping errors with detailed audit logging, see General attribute mapping errors. To learn about Logging pricing, see
Google Cloud Observability pricing.
To disable detailed audit logging for a workforce identity pool provider, omit the --detailed-audit-logging flag when you run gcloud iam workforce-pools providers create. To disable detailed audit logging, you can also update the provider.
To create the provider, click Submit.
Configure large numbers of groups in Microsoft Entra ID with OIDC code flow
This section describes how to map up to 400 groups from
Microsoft Entra ID to Workforce Identity Federation using the OIDC protocol
with code flow.
Configure your Microsoft Entra ID application
You can configure an existing Microsoft Entra ID application or create a new one. To configure your application, do
the following:
In the Microsoft Entra ID portal, do the following:
To update an existing application, do the following:
Go to the Overview page of your Microsoft Entra ID application
registration.
Navigate to Entra ID > App registrations.
Select the application that you want to update.
Create a new client secret in the application by following the instructions in Certificates & secrets. Make sure that you record the client secret value because it's displayed only once.
Note the following values from the application that you created or
updated. You provide the values when you configure the workforce identity
pool provider later in this document.
Client ID
Issuer URI
Client Secret
Tenant ID
To retrieve the Microsoft Entra ID groups, add the API permission to let Workforce Identity Federation access users' information from Microsoft Entra ID using the Microsoft Graph API and grant admin consent.
In Microsoft Entra ID, do the following:
Go to API permissions.
Click Add a Permission.
Select Microsoft API.
Select Delegated permissions.
In the search field, enter User.Read.
Click Add permissions.
You can retrieve the Microsoft Entra ID groups using a group object identifier (ID), a group email address for email-enabled groups, or a group display name.
If you choose to retrieve groups as group email addresses or display names, the next step is required.
To retrieve the Microsoft Entra ID groups as group email addresses or display names, do the following. If you retrieve groups as group object identifiers, skip this step.
Go to API permissions.
Click Add a Permission.
Select Microsoft API.
Select Delegated permissions.
In the search field, enter GroupMember.Read.All.
Click Add permissions.
Go to the Overview page of the Microsoft Entra ID application
that you created or updated earlier. Click Endpoints.
The issuer URI is the OIDC metadata document URI, omitting the path
/.well-known/openid-configuration.
For example, if the OIDC metadata document is
https://login.microsoftonline.com/d41ad248-019e-49e5-b3de-4bdfe1fapple/v2.0/.well-known/openid-configuration,
the issuer URI is https://login.microsoftonline.com/d41ad248-019e-49e5-b3de-4bdfe1fapple/v2.0/.
PROVIDER_ID: a unique provider ID.
The prefix gcp- is reserved and can't be used in a pool or
provider ID.
WORKFORCE_POOL_ID: the workforce pool ID.
DISPLAY_NAME: a display
name for the provider.
ISSUER_URI: the issuer URI from the Microsoft Entra
ID application that you created earlier in this document.
CLIENT_ID: the client ID from your Microsoft Entra ID application.
ATTRIBUTE_MAPPING: the mapping of attributes from
Microsoft Entra ID to Google Cloud.
If you use --extra-attributes flags to query groups from
Microsoft Entra ID, any google.groups mapping that uses
standard SAML or OIDC claims is ignored. For example, to map
groups and subject attributes from Microsoft
Entra ID, use the following attribute mapping:
EXTRA_ATTRIBUTES_ISSUER_URI: the issuer URI from
your Microsoft Entra ID application.
EXTRA_ATTRIBUTES_CLIENT_ID: the client ID from your
Microsoft Entra ID application.
EXTRA_ATTRIBUTES_CLIENT_SECRET: the extra client
secret from your Microsoft Entra ID application.
EXTRA_ATTRIBUTES_TYPE: use
azure-ad-groups-mail to retrieve the email addresses of the
groups. Use azure-ad-groups-id to retrieve the IDs of the
groups. Use azure-ad-groups-display-name to retrieve the
display names of the groups.
EXTRA_ATTRIBUTES_FILTER: Optional. A filter
expression that is used when querying the Microsoft Graph API for
groups. You can use this parameter to ensure that the number of groups
fetched from the IdP remains below the limit of 400 groups.
The following example fetches the groups that have the prefix sales in their email ID:
--extra-attributes-filter='"mail:sales"'
The following expression fetches groups with a display name that contains the string sales.
--extra-attributes-filter='"displayName:sales"'
Workforce Identity Federation detailed audit logging logs information received from your IdP to Logging. Detailed audit logging can help you troubleshoot your workforce identity pool provider configuration. To learn how to troubleshoot attribute mapping errors with detailed audit logging, see General attribute mapping errors. To learn about Logging pricing, see
Google Cloud Observability pricing.
To disable detailed audit logging for a workforce identity pool provider, omit the --detailed-audit-logging flag when you run gcloud iam workforce-pools providers create. To disable detailed audit logging, you can also update the provider.
Console
In the Google Cloud console, go to the Workforce Identity
Pools page:
In the Workforce Identity Pools table, select the pool for
which you want to create the provider.
In the Providers section, click
add
Add Provider.
In the Select a Provider vendor list, select your identity
provider (IdP).
If your IdP isn't listed, then select
Generic Identity Provider.
In Select an authentication protocol, select OpenID
Connect (OIDC).
In the Create a provider section, do the following:
In Name, enter the name for the provider.
In Description, enter the description for the provider.
In Issuer (URL), enter the issuer URI.
The OIDC issuer URI must be in a valid URI format and start with https; for example,
https://example.com/oidc.
In Client ID, enter the OIDC client ID that is registered
with your OIDC IdP; the ID must match the aud claim of the JWT that is
issued by your IdP.
To create a provider that is enabled, make sure Enable
provider is on.
Click Continue.
In the Share your provider information with IdP section, copy
the URL. In your IdP, configure this URL as the redirect URI, which
informs your IdP where to send the assertion token after logging in.
Click Continue.
In the Configure OIDC Web Sign-in section, do the
following:
In the Flow type list, select Code.
In the Assertion claims behavior list, select either of the
following:
User info and ID token
Only ID token
In the Client secret field, enter the client secret from
your IdP.
Click Continue.
In Configure provider, you can configure an attribute
mapping and an attribute condition. To create an attribute
mapping, do the following. You can provide either the IdP field
name or a CEL-formatted
expression that returns a string.
Required: In OIDC 1, enter the subject from the IdP— for
example, assertion.sub.
Optional: To add additional attribute mappings, do the following:
In the corresponding OIDC n field, enter the name
of the IdP-specific field to map, in CEL format.
To increase the number of groups, do the following:
Select Use Extra Attributes.
In the Extra Attributes Issuer URI field, enter the issuer URL.
In the Extra Attributes Client ID field, enter the client ID.
In the Extra Attributes Client Secret field, enter the client secret.
In the Extra Attributes Type list, select an attribute type for extra attributes.
In the Extra Attributes Filter field, enter a filter expression that is used when querying the Microsoft Graph API for groups.
To create an attribute condition, do the following:
Click Add condition.
In the Attribute Conditions field, enter a condition in CEL format—
for example, assertion.role == 'gcp-users'. This example condition ensures that only users with the role gcp-users can sign in using this provider.
To turn on detailed audit logging, in Detailed logging,
click the Enable attribute value audit logging toggle.
Workforce Identity Federation detailed audit logging logs information received from your IdP to Logging. Detailed audit logging can help you troubleshoot your workforce identity pool provider configuration. To learn how to troubleshoot attribute mapping errors with detailed audit logging, see General attribute mapping errors. To learn about Logging pricing, see
Google Cloud Observability pricing.
To disable detailed audit logging for a workforce identity pool provider, omit the --detailed-audit-logging flag when you run gcloud iam workforce-pools providers create. To disable detailed audit logging, you can also update the provider.
To create the provider, click Submit.
Configure large numbers of groups in Microsoft Entra ID with SAML 2.0
This section describes how to map up to 400 groups from
Microsoft Entra ID to Workforce Identity Federation using the SAML 2.0
protocol.
Configure your Microsoft Entra ID application
To configure your application, do
the following:
In the Microsoft Entra ID portal, do the following:
To update an existing application, do the following:
Go to the Overview page of your Microsoft Entra ID application
registration.
Navigate to Entra ID > App registrations.
Select the application that you want to update.
Create a new client secret in the application by following the instructions in Certificates & secrets. Make sure that you record the client secret value because it's displayed only once.
Note the following values from the application that you created or
updated. You provide the values when you configure the workforce identity
pool provider later in this document.
Client ID
Issuer URI
Client Secret
Tenant ID
To retrieve the Microsoft Entra ID groups, add the API permission to let Workforce Identity Federation access users' information from Microsoft Entra ID using the Microsoft Graph API and grant admin consent.
In Microsoft Entra ID, do the following:
Go to API permissions.
Click Add a Permission.
Select Microsoft API.
Select Application permissions.
In the search field, enter User.ReadBasic.All.
Click Add permissions.
You can retrieve the Microsoft Entra ID groups using a group object identifier (ID), a group email address for email-enabled groups, or a group display name.
If you choose to retrieve groups as group email addresses or display names, the next step is required.
To retrieve the Microsoft Entra ID groups as group email addresses or display names, do the following. If you retrieve groups as group object identifiers, skip this step.
Go to API permissions.
Click Add a Permission.
Select Microsoft API.
Select Application permissions.
In the search field, enter GroupMember.Read.All.
Click Add permissions.
Go to the Overview page of the Microsoft Entra ID application
that you created or updated earlier. Click Endpoints.
The issuer URI is the OIDC metadata document URI, omitting the path
/.well-known/openid-configuration.
For example, if the OIDC metadata document is
https://login.microsoftonline.com/d41ad248-019e-49e5-b3de-4bdfe1fapple/v2.0/.well-known/openid-configuration,
the issuer URI is https://login.microsoftonline.com/d41ad248-019e-49e5-b3de-4bdfe1fapple/v2.0/.
PROVIDER_ID: a unique provider ID.
The prefix gcp- is reserved and can't be used in a pool or
provider ID.
WORKFORCE_POOL_ID: the workforce pool ID.
DISPLAY_NAME: a display
name for the provider.
XML_METADATA_PATH: the path to the SAML 2.0 XML metadata file.
ATTRIBUTE_MAPPING: the mapping of attributes from
Microsoft Entra ID to Google Cloud.
If you use --extra-attributes flags to query groups from
Microsoft Entra ID, any google.groups mapping that uses
standard SAML or OIDC claims is ignored. For example, to map
groups and subject attributes from Microsoft
Entra ID, use the following attribute mapping:
EXTRA_ATTRIBUTES_ISSUER_URI: the issuer URI from
your Microsoft Entra ID application.
EXTRA_ATTRIBUTES_CLIENT_ID: the client ID from your
Microsoft Entra ID application.
EXTRA_ATTRIBUTES_CLIENT_SECRET: the extra client
secret from your Microsoft Entra ID application.
EXTRA_ATTRIBUTES_TYPE: use
azure-ad-groups-mail to retrieve the email addresses of the
groups. Use azure-ad-groups-id to retrieve the IDs of the
groups. Use azure-ad-groups-display-name to retrieve the
display names of the groups.
EXTRA_ATTRIBUTES_FILTER: Optional. A filter
expression that is used when querying the Microsoft Graph API for
groups. You can use this parameter to ensure that the number of groups
fetched from the IdP remains below the limit of 400 groups.
The following example fetches the groups that have the prefix sales in their email ID:
--extra-attributes-filter='"mail:sales"'
The following expression fetches groups with a display name that contains the string sales.
--extra-attributes-filter='"displayName:sales"'
Workforce Identity Federation detailed audit logging logs information received from your IdP to Logging. Detailed audit logging can help you troubleshoot your workforce identity pool provider configuration. To learn how to troubleshoot attribute mapping errors with detailed audit logging, see General attribute mapping errors. To learn about Logging pricing, see
Google Cloud Observability pricing.
To disable detailed audit logging for a workforce identity pool provider, omit the --detailed-audit-logging flag when you run gcloud iam workforce-pools providers create. To disable detailed audit logging, you can also update the provider.
Console
In the Google Cloud console, go to the Workforce Identity
Pools page:
In the Workforce Identity Pools table, select the pool for
which you want to create the provider.
In the Providers section, click
add
Add Provider.
In the Select a Provider vendor list, select your identity
provider (IdP).
If your IdP isn't listed, then select
Generic Identity Provider.
In Select an authentication protocol, select SAML.
In the Create a provider section, do the following:
In Name, enter a name for the provider.
Optional: In Description, enter a description for the
provider.
In IDP metadata file (XML), select the metadata XML file
that you generated earlier in this guide.
To create a provider that is enabled, make sure Enable
provider is on.
Click Continue.
In the Share your provider information section, copy the
URLs. In your IdP, configure the first URL as the entity ID, which identifies your application to IdP.
Configure the other URL as the redirect URI, which informs your IdP where to send the
assertion token after logging in.
Click Continue.
In the Configure provider section, do the following:
In Attribute mapping, enter a CEL expression for
google.subject.
Optional: To enter other mappings, click Add mapping and
enter other mappings—for example:
This example maps the assertion.subject IdP attribute to google.subject and the assertion.attributes.costcenter[0] IdP attribute to attribute.costcenter.
If you selected Microsoft Entra ID as your IdP,
you can increase the number of groups.
Select Use Extra Attributes.
In the Extra Attributes Issuer URI field, enter the issuer
URL.
In the Extra Attributes Client ID field, enter the client
ID.
In the Extra Attributes Client Secret field, enter the client
secret.
In the Extra Attributes Type list, select an attribute type
for extra attributes.
In the Extra Attributes Filter field, enter a filter
expression that is used when querying the Microsoft Graph API for
groups.
Optional: To add an attribute condition, click Add condition
and enter a CEL expression representing an attribute condition.
For example, to limit the ipaddr attribute to a certain IP range
you can set the condition assertion.attributes.ipaddr.startsWith('98.11.12.'). This example condition ensures that only users with an IP address that starts with 98.11.12. can sign in using this workforce provider.
Click Continue.
To turn on detailed audit logging, in Detailed logging,
click the Enable attribute value audit logging toggle.
Workforce Identity Federation detailed audit logging logs information received from your IdP to Logging. Detailed audit logging can help you troubleshoot your workforce identity pool provider configuration. To learn how to troubleshoot attribute mapping errors with detailed audit logging, see General attribute mapping errors. To learn about Logging pricing, see
Google Cloud Observability pricing.
To disable detailed audit logging for a workforce identity pool provider, omit the --detailed-audit-logging flag when you run gcloud iam workforce-pools providers create. To disable detailed audit logging, you can also update the provider.
To create the provider, click Submit.
Verify your provider configuration
Before testing the end-user sign-in flow, you can verify that your provider configuration is correct and that Google Cloud can exchange tokens with your IdP.
The Validate your provider attributes page in the Google Cloud console includes an attributes viewer that lets you
interactively test your configuration and debug Common Expression
Language (CEL) expressions. You can use the attributes viewer to do
the following:
View the raw attributes sent in the IdP assertion.
Verify that your attribute mappings and conditions correctly transform
those attributes.
Debug complex CEL expressions in real time.
To verify your provider configuration, do the following:
To enable the browser-based sign-in flow for Workforce Identity Federation, add https://auth.cloud.google/signin-callback/locations/global/workforcePools/POOL_ID/providers/PROVIDER_ID to your IdP's list of allowed redirect URIs.
In the Google Cloud console, go to Workforce Identity Pools.
From the list of pools, click the name of the pool you want to verify.
In the Workforce pool details page, click the name of the IdP you want
to verify.
In the Provider Details page, click Debug IdP token.
In the Sign in dialog, sign in to your IdP as a test user.
The Validate your provider attributes page displays the mapped attributes
and the result of your attribute condition.
The Mapped attributes from your IdP token section displays how Google attributes, such as
google.subject, are populated from your IdP's token based on your
mapping configuration. An error icon appears if a mapping is incorrect.
The Attribute condition section shows the boolean result of your
condition. If the condition evaluates to false, the sign-in is
blocked.
To view the full assertion token, click View full token. This shows the raw JSON object from your IdP. Reference a
top-level property in your mappings using the format
assertion.PROPERTY_NAME.
Edit your provider configuration
To correct any errors, you can edit the configuration:
In the Validate your provider attributes page, click
edit
Edit.
Make the necessary changes.
To start a new test and see the updated results, click Save and refetch token.
Grant IAM roles to groups
In this section you grant roles to groups on Google Cloud resources.
To learn more about Workforce Identity Federation principal identifiers,
see Represent workforce pool users in IAM policies.
The following example grants the Storage Admin role (roles/storage.admin)
to users in a Microsoft Entra ID group.
GROUP_ID: the group identifier, which depends on
the value of --extra-attributes-type that was used to create
the workforce identity pool provider, as follows:
azure-ad-groups-mail: the group identifier is an email address—for example: admin-group@altostrat.com
azure-ad-groups-id: the group identifier is a UUID
for the group—for example: abcdefgh-0123-0123-abcdef
Sign in and test access
In this section, you sign in as a workforce identity pool user and test that you
have access to Google Cloud resources.
Sign in
This section shows you how to sign in as a federated user and access
Google Cloud resources.
Console (federated) sign-in
To sign in to the Google Cloud Workforce Identity Federation console, also known as the console (federated), do the following:
WORKFORCE_POOL_ID: The Workforce Identity Federation pool ID.
WORKFORCE_PROVIDER_ID: The Workforce Identity Federation provider ID.
LOGIN_CONFIG_PATH: The path to write the login configuration file
to. For example, login-config.json.
The login configuration file contains the endpoints used by the gcloud CLI to enable
the browser-based authentication flow and set the audience to the IdP that was configured in the
workforce identity pool provider. The file doesn't contain confidential information.
The login configuration file content looks similar to the following:
Point to the login configuration file with an environment variable, a property in the active
gcloud CLI configuration, or use it directly with the gcloud auth login
command:
The gcloud auth login command stores access
credentials in your home directory. The authenticated principal becomes the active principal in
your active gcloud CLI configuration. Unless overridden, the gcloud CLI uses
these stored credentials to access Google Cloud.
gcloud CLI headless sign-in
To sign in to Microsoft Entra ID with the gcloud CLI, do the
following:
You now have access to the Google Cloud products that support
Workforce Identity Federation and to which you are granted access. Earlier in
this document, you granted the Storage Admin role (roles/storage.admin)
to all of the identities within the group identifier that you specified in the
gcloud projects add-iam-policy-binding for project TEST_PROJECT_ID.
You can now test that you have access by listing Cloud Storage buckets.
Workforce Identity Federation creates user metadata and resources for
federated user identities. If you choose to delete users in your IdP you must
also explicitly delete these resources in Google Cloud.
To do so, see Delete Workforce Identity Federation users and their data.
You might see resources continue to be associated with a user that was deleted.
This is because deleting user metadata and resources requires a long-running
operation. After you initiate a deletion of a user's identity, processes that
the user initiated before the deletion can continue to run until the processes
complete or are canceled.
[[["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 2026-07-21 UTC."],[],[]]