Grant a role to a member in an organization. The member can either be a human user or a service account. The name of the binding is auto-generated.
EXAMPLES
To grant the role "pr-test-role" for user "test-user@example.com" with IdP prefix "fop" in organization "org-1", run:
gdcloud organizations add-iam-policy-binding org-1 --role=pr-test-role --member=user:fop-test-user@example.com
To grant the role "pr-test-role" for service account "test-sa" of project "test-sa-project" in the organization "org-1", run:
gdcloud organizations add-iam-policy-binding org-1 --role=pr-test-role --member=serviceAccount:test-sa-project:test-sa
REQUIRED FLAGS
--member string The member to add binding for, defined by either user:EMAIL or serviceAccount:SERVICE_ACCOUNT_PROJECT:SERVICE_ACCOUNT_NAME. The email must contain the IdP prefix for the user.
--role string Role name to assign to the member.
GDCLOUD WIDE FLAGS
These flags are available to all commands: --configuration, --format, --help, --project, --quiet.
[[["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-04-12 UTC."],[[["This command, `gdcloud organizations add-iam-policy-binding`, is used to grant a specific role to a user or service account within an organization."],["The command requires the organization ID, the desired role to be granted, and the member's details, which include either a user email with an IdP prefix or service account information."],["The member specification format can either be `user:EMAIL` or `serviceAccount:SERVICE_ACCOUNT_PROJECT:SERVICE_ACCOUNT_NAME`."],["The role is assigned to a member within a specified organization using the `--role` and `--member` flags, respectively."],["Common flags such as `--configuration`, `--format`, `--help`, `--project`, and `--quiet` are available for use with this command."]]],[]]