Method: projects.locations.instances.users.enableRole

Enables one role of a User: grants it, or re-enables it if it was disabled. The User's other roles are not affected.

SIGNER is ACTIVE immediately and needs team. ADMIN and POLICY_AUTHOR need authorizationInfo, and are PENDING_ACTIVE until enough Admins approve with users.approveRoleChange.

Fails with FAILED_PRECONDITION if the role is already ACTIVE or PENDING_ACTIVE, if the User is DISABLED (use users.enable first), or while the User has a pending change.

HTTP request

POST https://mpc.googleapis.com/v1beta/{name=projects/*/locations/*/instances/*/users/*}:enableRole

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The name of the User. Format: projects/{project}/locations/{location}/instances/{instance}/users/{user}

Request body

The request body contains data with the following structure:

JSON representation
{
  "role": enum (Role),
  "team": string,
  "authorizationInfo": {
    object (AuthorizationInfo)
  }
}
Fields
role

enum (Role)

Required. The role to enable.

team

string

Optional. The resource name of the Team the User joins. Required if role is SIGNER; must be empty otherwise. Format: projects/{project}/locations/{location}/instances/{instance}/teams/{team}

authorizationInfo

object (AuthorizationInfo)

Optional. The calling Admin's signature over a UserSigningPayload with an ENABLE role change for role. Required if role is ADMIN or POLICY_AUTHOR; must be empty otherwise.

Response body

If successful, the response body contains an instance of User.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.