Using Console
Using CLI
ORGANIZATION_ID
with your organization ID.
DOMAIN_NAME
with your G Suite domain name.
This command restricts sharing of GCP resources to only users with email addresses in the specified G Suite domain.
DOMAIN_NAME
with your G Suite domain name.
This command should return the following output:
PROJECT_ID
with your GCP project ID.
This command lists all the users who have access to your GCP resources. Make sure that all the users have email addresses in the specified G Suite domain. If any user does not have an email address in the specified G Suite domain, remove their access to the GCP resources using the following command:
PROJECT_ID
with your GCP project ID, EMAIL_ADDRESS
with the email address of the user, and ROLE
with the role that the user has been assigned.
This command removes the user’s access to the specified GCP resources.
Using Python
google-auth
and google-api-python-client
libraries to authenticate and make API requests to the GCP Admin SDK.
googleapiclient.discovery
module. We can use the users().update()
method to update the email address of the user.