{"data":{"slug":"github-google-skills-skills-cloud-cloud-operator-admin-setup-8637d73fd0d0","title":"Set Up Cloud Operator for an Organization","summary":"Configure the Cloud Operator Agent for a Google Cloud organization using gcloud or the console. This is required when Cloud Operator is disabled or the user has no access.","url":"https:\/\/skillshunter.net\/skills\/github-google-skills-skills-cloud-cloud-operator-admin-setup-8637d73fd0d0","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-google-skills-skills-cloud-cloud-operator-admin-setup-8637d73fd0d0","markdown_url":"https:\/\/skillshunter.net\/skills\/github-google-skills-skills-cloud-cloud-operator-admin-setup-8637d73fd0d0.md","download_url":"https:\/\/skillshunter.net\/skills\/github-google-skills-skills-cloud-cloud-operator-admin-setup-8637d73fd0d0\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before executing any `gcloud`, REST API, or MCP command, you MUST read and follow the instructions in [Usage Attribution](references\/attribution.md). The user must be signed in as an administrator with Application Default Credentials, and the organization ID must be provided or determined through lookup commands.","instructions":"---\nname: cloud-operator-admin-setup\nmetadata:\n  version: \"1.0.0\"\n  category: CloudInfrastructureAndServices\ndescription: >-\n  Sets up and manages the Cloud Operator Agent (\"Gemini for Google Cloud\n  operations\" in the console) for a Google Cloud organization: turning it on or\n  off, its organization-wide settings, and user access. Use when an\n  organization administrator wants to set it up for the whole organization or\n  change it, or when Cloud Operator is turned off for the organization or the\n  user has no access there. Don't use when someone asks to set up Cloud\n  Operator or their operator agent for themselves, even in a named\n  organization (use `cloud-operator-setup`).\n---\n\n# Set up Cloud Operator for an organization\n\nGo through the steps in order: show the current value, explain each option in\na sentence, and wait for their answer. Ask Steps 5\u20137 together, in one message:\nthey can keep all of them or name the ones to change. Every choice is the\nadministrator's: never recommend accepting the preview terms or any setting,\nand change only what they chose. Their choice is the confirmation, and so is a\nrequest that names the new value (for example \"don't allow memory\"); turning\nCloud Operator on or back on, and granting a role, always need their reply\nfirst (Step 4, Give a user access). Send a change once they choose it; for\nSteps 5\u20137, send only the ones they changed, in one request. Talk to the user in\nplain terms: don't name this skill's steps, sections or cases.\n\n| They ask to | Do |\n| --- | --- |\n| Set up Cloud Operator for the whole organization (as its administrator) | Steps 1\u20138 |\n| Change one setting | Steps 1\u20133, that step (Step 4 first if it's off), Step 8 |\n| Turn Cloud Operator back on | Steps 1\u20134, then Step 8 |\n| Turn Cloud Operator off | [Turn it off](#turn-it-off) |\n| Give someone access | [Give a user access](#give-a-user-access) |\n| Their agent can't be created because it's turned off or they have no access (sent by another skill) | [Coming from setup](#coming-from-setup) |\n\n## Usage Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read and follow the instructions in\n[Usage Attribution](references\/attribution.md).\n\n## Step 1: gcloud\n\nThe calls below need gcloud signed in as an administrator of the organization,\nwith Application Default Credentials\n(`gcloud auth application-default print-access-token` works); say which\naccount you'll use. Both sign-ins must be the same account: the API calls use\nApplication Default Credentials, while the role grant and\n`gcloud config get-value account` use the gcloud sign-in. You can't see the\nApplication Default Credentials account directly, so ask them to confirm they\nused the same account for both. Ask it in the same reply as Step 3's read;\nyou need their answer only before the first change. If it's installed but not\nsigned in, they run `gcloud auth login` and\n`gcloud auth application-default login`. Otherwise, or if signing in fails,\nuse [the console](#without-gcloud-the-console), or they install gcloud\n(https:\/\/docs.cloud.google.com\/sdk\/docs\/install-sdk.md.txt) first. Without\ngcloud, don't reach the APIs another way (for example by reading credential\nfiles or creating tokens).\n\n## Step 2: Organization ID\n\nCalls use the numeric ID. Take it from the user or the error they saw, or ask\nfor its ID, domain or a project in it: resolve a domain with\n`gcloud organizations list --filter=\"displayName={domain}\" --format=json`\n(if several match, ask which), a project with\n`gcloud projects get-ancestors {project_id} --format=json` (the `id` of the\nentry whose `type` is `organization`; if there's none, Cloud Operator works\nonly in organizations: stop). If a lookup fails or finds nothing, ask for the\nID; never guess. Before changing anything, say which organization and account\nyou're using, for example \"Setting up Cloud Operator for organization\n{org_id} as {account}.\"\n\n## Step 3: Read the settings\n\n```bash\ncurl -sS -w '\\nHTTP %{http_code}\\n' \\\n  -H \"Authorization: Bearer $(gcloud auth application-default print-access-token)\" \\\n  \"https:\/\/geminicloudassist.googleapis.com\/v1alpha\/organizations\/{org_id}\/locations\/global\/agentAdminSettings\"\n```\n\n| Result | Do |\n| --- | --- |\n| 200 | Keep the `etag`. Show Gemini usage (`enablementState`), agent memory (`memoryDisabled`), agent actions (`effectiveMutationMode`) and data sharing (`effectiveDataSharingAvailability`) |\n| 403 `IAM_PERMISSION_DENIED` | The account can't manage these settings (an Organization Administrator can). If they asked to set up Cloud Operator without saying it's for the whole organization, they may only want their own agent: use `cloud-operator-setup` instead (it tells turned off from no access). If it may be the wrong account, they switch (Step 1); otherwise give them the [message for their administrator](#message-for-an-administrator) and stop |\n| 401, or `ACCESS_TOKEN_TYPE_UNSUPPORTED` | Credentials: Step 1 once more, then the console |\n| 400 \"Consumer 'organizations\/{id}' is invalid\", or 404 | Wrong ID: ask for it; if they confirm it, stop |\n| Anything else | Show the error and offer the console |\n\nThe response leaves out false fields: no `memoryDisabled` means memory is\nallowed, no `writePreviewEnrolled` means not enrolled.\n\n## Step 4: Gemini usage\n\n| `enablementState` | Tell them | Choice | On yes, send |\n| --- | --- | --- | --- |\n| `ENABLED` | It's on, under the [preview terms](#preview-terms) | \u2014 | \u2014 |\n| `EXCLUDED`, no `disableTime` | It isn't on. Name the `exclusionReasons` (for example VPC Service Controls, CMEK, Assured Workloads, data residency, a Business Associate Agreement, EU billing), or if there are none, that it isn't on by default. Then [what enabling doesn't change](#what-enabling-doesnt-change) and the [preview terms](#preview-terms) | **Enable** \/ **Not now** | `{\"previewAcceptance\": true, \"agentsDisabled\": false, \"etag\": \"{etag}\"}`, `updateMask=previewAcceptance,agentsDisabled` |\n| `EXCLUDED` with `disableTime` | Google turned it off then, for those reasons; sessions can be exported until `disableTime` + 30 days, then everything is deleted. Then as above | **Restore** \/ **Not now** | Same |\n| `DISABLED_BY_ADMIN` | An administrator turned it off on `disableTime`; agents and sessions are deleted 30 days later (give that date with its year: it can fall in the next year). Then the [preview terms](#preview-terms) | **Restore** \/ **Not now** | `{\"agentsDisabled\": false, \"etag\": \"{etag}\"}`, `updateMask=agentsDisabled` |\n\n[Send it](#sending-a-change) only after an explicit **Enable** or **Restore**\nin their reply, even when they asked to turn it on or back on (show the state\nand the terms first), and check the response shows `ENABLED`. If a Restore\ncomes back `EXCLUDED`, continue with that row: name the `exclusionReasons`,\nand send **Enable** (with `previewAcceptance`) only on their choice. Then read\nthe settings again (Step 3) and use that read for Steps 5\u20137: enabling can change\n`writePreviewEnrolled`, `effectiveDataSharingAvailability` and the `etag`.\nThen continue as routed. On **Not now**,\nstop: the other settings can't change while it's off ([coming from\nsetup](#coming-from-setup), go back to the skill that sent them).\n\n## Step 5: Agent memory\n\n**Allow** (users can turn on memory, so their agents remember context across\nsessions) or **Don't allow** (no memories saved or recalled in new sessions;\nexisting ones are paused, not deleted). If it changes, send `memoryDisabled`\n(`true` = don't allow).\n\n## Step 6: Agent actions\n\nWithout `writePreviewEnrolled`, agents stay read only (the organization isn't\nin the write preview): say so and skip. Otherwise, from `effectiveMutationMode`:\n**Read only** (agents inspect resources, logs and metrics but change nothing) or\n**Read and write** (they can also create and update resources; every change\nneeds the user's approval). If it changes, send `mutationMode` (`READ_ONLY` or\n`WRITE_WITH_APPROVAL`). \"Write actions are in private preview\" means not\nenrolled.\n\n## Step 7: Data sharing\n\nIf `effectiveDataSharingAvailability` is `NOT_AVAILABLE_IN_REGION` (billed in\nthe EEA, Switzerland or the UK), say so and skip. Otherwise **Allow** (users may\nopt in to sharing interaction data with Google; off for each user until they do)\nor **Don't allow** (no one can opt in). If it changes, send\n`dataSharingWithGoogleDisabled` (`true` = don't allow).\n\n## Step 8: Summary\n\nRead the settings again and show the four values. Tell them changes take about\na minute to apply. Offer `cloud-operator-setup` for their own agent.\n\n## Coming from setup\n\n`cloud-operator-setup` (or `cloud-operator`) sends a user here when their\noperator agent can't be created or used because Cloud Operator is turned off\nfor the organization, or they have no access there. They may not be an\nadministrator. You already have the organization ID, and the other skill says\nwhich case it is. If it doesn't, do a Step 3 read first: `ENABLED` means no\naccess, anything else means turned off; if the read returns 403 (here that\ndoesn't stop you), ask the user what the page or error said, and if that\ndoesn't tell, cover both cases. If\ngcloud stops working here (for example a 401), use the **Without gcloud** reply\nbelow instead of the full console walkthrough. When done, go back to the skill\nthat sent them, saying what changed (or that nothing did); after a change, that\nskill waits about a minute and runs its check call again before anything\nelse.\n\n- **Without gcloud:** you can't check, so cover both in one reply: an\n  administrator turns it on at\n  `https:\/\/console.cloud.google.com\/gemini\/admin\/onboarding?organizationId={org_id}`\n  (**Enable Gemini**, which accepts the preview terms for the whole\n  organization) or grants access under **IAM & Admin** > **IAM**; anyone else\n  sends the [message for their administrator](#message-for-an-administrator).\n- **Turned off:** say which organization and account you're using, and do Step\n  3. On 403, they aren't an administrator: give them the enable\n  [message](#message-for-an-administrator). On 200, do Step 4 only (if it's\n  already `ENABLED`, the problem is access instead: continue with **No access**\n  below); the other settings keep their defaults and can be changed later.\n- **No access:** users get access without a role only in their own (home)\n  organization, the one their account belongs to; elsewhere an administrator\n  grants `roles\/geminicloudassist.user`. First check whether this is their home\n  organization: compare the domain of their account (`gcloud config get-value\n  account`) with the organization's name (`gcloud organizations describe\n  {org_id} --format=\"value(displayName)\"`, its primary domain).\n  - **Same:** their home organization, where users normally have access, so an\n    administrator has restricted it.\n  - **Different** (most likely another organization; a secondary domain of the\n    same company is possible): they need the role.\n  - **Can't tell** (the organization can't be read): cover both in one reply.\n\n  In every case, check whether they can grant it themselves (read-only):\n\n  ```bash\n  curl -sS -w '\\nHTTP %{http_code}\\n' -X POST \\\n    -H \"Authorization: Bearer $(gcloud auth application-default print-access-token)\" \\\n    -H \"Content-Type: application\/json\" \\\n    -d '{\"permissions\": [\"resourcemanager.organizations.setIamPolicy\"]}' \\\n    \"https:\/\/cloudresourcemanager.googleapis.com\/v3\/organizations\/{org_id}:testIamPermissions\"\n  ```\n\n  If it returns HTTP 200 with the permission, confirm that gcloud and\n  Application Default Credentials are signed in as the same account (as in\n  Step 1), then offer to grant\n  `roles\/geminicloudassist.user`\n  to their own account, saying it lets them create and use their own operator\n  agent in that organization; if they accept, run the grant in\n  [Give a user access](#give-a-user-access) directly (their acceptance is the\n  confirmation; you already have the organization). If it returns HTTP 200\n  without it, give them the access [message](#message-for-an-administrator)\n  (in their home organization, asking to restore access instead). On any other\n  error, you can't tell: cover both in one reply.\n\n## Give a user access\n\nUsers can create an agent without a role only in their home organization;\nelsewhere they need `roles\/geminicloudassist.user` on the organization. Give\nit when a user's call to their agent fails with a permission error (for example\n`Permission 'geminicloudassist.agents.invoke' denied`), or when the\nadministrator asks to give someone access. Do Steps 1\u20132 unless coming from\nsetup, which already has them. If you don't know\nwhether Cloud Operator is on, also run Step 3: if it's off, say the role won't\nhelp until it is, and if it returns 403, skip the check and go on since it only\nmeans they can't read the settings. Get the member\n(`user:{email}`, `group:{email}` or `domain:{domain}`; never guess) unless the\ncaller gave it. Confirm once what it allows (creating and using their own\noperator agent in that organization) and wait for their yes, even when they\nnamed the member; skip this only when another skill sent you here after the\nuser agreed there. Then grant only that role:\n\n```bash\ngcloud organizations add-iam-policy-binding {org_id} \\\n  --member=\"{member}\" --role=\"roles\/geminicloudassist.user\" --condition=None\n```\n\nA permission error means the account can't change the organization's IAM\npolicy. An allowed-domains error means the organization's domain-restricted\nsharing policy blocks that domain: tell them (a member from an allowed domain\nwould work) and don't change the policy. Without gcloud: **IAM &\nAdmin** > **IAM** in the console. It can take a few minutes to apply. If another\nskill sent them, go back to it, saying whether it was granted.\n\n## Turn it off\n\nAfter Steps 1\u20133 (if it isn't `ENABLED`, it's already off: say so and stop),\nwarn them: all\noperator agents in the organization stop immediately; users have 30 days to\nexport their sessions; then all agents and sessions are permanently deleted;\nthey can restore it within those 30 days. Ask them to type `disable` to\nconfirm; anything else cancels. Then [send](#sending-a-change)\n`{\"agentsDisabled\": true, \"etag\": \"{etag}\"}` with\n`updateMask=agentsDisabled`, check for `DISABLED_BY_ADMIN`, and give the\ndeletion date with its year (`disableTime` + 30 days; it can fall in the next\nyear).\n\n## Without gcloud: the console\n\nAsk for the numeric organization ID (you can't look it up) and walk them\nthrough\n`https:\/\/console.cloud.google.com\/gemini\/admin\/onboarding?organizationId={org_id}`\nas an administrator (without the ID, leave out `?organizationId=\u2026` and they\npick the organization at the top).\n\n- **Welcome page:** \"enabled\" \u2192 **Continue to settings**. \"Disabled\" \u2192 it shows\n  the preview terms; **Enable Gemini** accepts them for the whole organization,\n  then **Continue to settings**. A page to create their own agent instead means\n  they aren't an administrator: [message for their\n  administrator](#message-for-an-administrator).\n- **Organization settings:** the same choices as Steps 4\u20137: **Gemini usage**\n  (**Restore**, or **Disable** with the [warning](#turn-it-off) and typing\n  `disable`), **Agent memory**, **Agent actions** (shown only if enrolled),\n  **Data sharing**; then **Save**.\n- **Access:** **IAM & Admin** > **IAM**, role `roles\/geminicloudassist.user`.\n\n## Reference\n\n### Sending a change\n\nSend only the changed fields, named in `updateMask` (comma-separated), with\nthe `etag` from your last read:\n\n```bash\ncurl -sS -w '\\nHTTP %{http_code}\\n' -X PATCH \\\n  -H \"Authorization: Bearer $(gcloud auth application-default print-access-token)\" \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\"memoryDisabled\": true, \"etag\": \"{etag}\"}' \\\n  \"https:\/\/geminicloudassist.googleapis.com\/v1alpha\/organizations\/{org_id}\/locations\/global\/agentAdminSettings?updateMask=memoryDisabled\"\n```\n\nThe response is the updated settings: check the value and keep its `etag`. A\n409 `ABORTED` (\"Provided etag is out of date\") means the settings changed\nsince your read: read again. If none of the values you showed them changed\n(only the `etag`, as right after enabling), resend with the new `etag`\nwithout asking. Otherwise show what changed and ask again about your change\n(skip it if it's already there). For any other error (for example a 403 when\nthe account can read the settings but not change them), show it and stop.\n\n### What enabling doesn't change\n\nWith VPC Service Controls (`VPC_SC`), agents still can't reach projects inside\na service perimeter. With EU billing (`EU_BILLING_ACCOUNT`), data sharing stays\noff. Mention the ones that apply.\n\n### Preview terms\n\nShow in full before enabling or restoring: \"This product is subject to the\nPre-GA Offerings Terms in the General Service Terms section of the Service\nSpecific Terms (https:\/\/cloud.google.com\/terms\/service-terms) and the\nAdditional Terms for Generative AI Preview Products\n(https:\/\/cloud.google.com\/trustedtester\/aitos), and should not be used with\npersonal data or other data subject to legal or regulatory compliance\nrequirements. By enabling it, you acknowledge and agree to these\nterms on behalf of your organization. You can turn it off at any time.\"\n\n### Message for an administrator\n\n- **Enable:** \"Please turn on Gemini for Google Cloud operations (Cloud\n  Operator) for our organization {org_id}. As an organization administrator,\n  open\n  https:\/\/console.cloud.google.com\/gemini\/admin\/onboarding?organizationId={org_id}\n  or run the cloud-operator-admin-setup skill.\"\n- **Access:** \"Please grant me ({email}) roles\/geminicloudassist.user on\n  organization {org_id} so I can create my Gemini for Google Cloud operations\n  (Cloud Operator) agent:\n  `gcloud organizations add-iam-policy-binding {org_id} --member=\"user:{email}\"\n  --role=\"roles\/geminicloudassist.user\" --condition=None`\"\n\nAdjust it to what they need, for example \"turn it back on\".\n","use_cases":["An administrator wants to enable Cloud Operator for the entire organization.","A user has no access to Cloud Operator and needs it enabled.","Cloud Operator is disabled for the organization, and the user needs to restore it."],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/google\/skills\/blob\/27c1beae9cd7c34aa4ebde9de3735898e50a1a19\/skills\/cloud\/cloud-operator-admin-setup\/SKILL.md","source_commit":"27c1beae9cd7c34aa4ebde9de3735898e50a1a19","license":null,"version":null,"listing_approved_at":"2026-11-28","created_at":"2026-11-27T13:12:39.000000Z","updated_at":"2026-11-28T18:34:10.000000Z","seo_title":"Set Up Cloud Operator for Organization","seo_description":"Configure Cloud Operator Agent for an organization using gcloud or the console. Use when the organization has Cloud Operator disabled or the user has no access.","seo_keywords":["Set up Cloud Operator for organization","Enable Cloud Operator for organization","Restore Cloud Operator access","Cloud Operator configuration"]}}