> [!NOTE]
> **Note** : To use this feature, your project must be linked to a
> [Cloud Billing
> account](https://docs.cloud.google.com/billing/docs/concepts#billing_account_types), such as an upgraded self-serve (online) billing account, an
> invoiced billing account, or a
> [billing subaccount](https://docs.cloud.google.com/billing/docs/concepts.md.txt#subaccounts) of an
> invoiced billing account. With a self-serve (online) billing account, you pay
> for Pay-as-you-go edition usage and usage above quota with
> [prepaid credits](https://docs.cloud.google.com/gemini/enterprise/docs/manage-prepaid-credits.md.txt).
> With an invoiced billing account or a billing subaccount of an invoiced billing
> account, this usage is billed on your monthly invoice.

Default roles often provide broad access. To restrict access to AI developer
tools and better align permissions with your organization's security policies,
create custom roles. This guide shows you how to create and assign a custom
IAM role for Gemini Enterprise's AI developer tools in the
Google Cloud console.

When AI developer tools are enabled, users with a Gemini Enterprise
license can access these tools if you grant them the
[Gemini Enterprise User](https://docs.cloud.google.com/gemini/enterprise/docs/access-control.md.txt#discoveryengine.agentspaceUser)
(`roles/discoveryengine.agentspaceUser`) role.

## Create a custom IAM role

To create a custom IAM role that restricts access to AI developer
tools, follow these instructions:

1. In the Google Cloud console, go to **IAM \& Admin \> Roles**.
2. Click **Create role**.
3. Enter the role details:

   - **Title:** Give your role a name. For example, Custom Gemini Enterprise User.
   - **ID:** The Google Cloud console automatically generates the ID, but you can edit it.
   - **Role launch stage:** Set this to "General Availability".
4. Click **Add permissions**.

5. In the panel, search for and select the
   [Gemini Enterprise User](https://docs.cloud.google.com/gemini/enterprise/docs/access-control.md.txt#discoveryengine.agentspaceUser)
   (`roles/discoveryengine.agentspaceUser`) role.

6. Remove all permissions starting with `businessaicode.` from the
   Gemini Enterprise User role to ensure users assigned this custom role
   can't access the AI developer tools feature.

7. Click **Create**.

## Add users to the custom role

To add users to the custom role you created, follow these steps:

1. In the Google Cloud console, go to **IAM \& Admin \> IAM**.
2. Click the **Grant access** button at the top of the page.
3. In the **New principals** field, enter the email addresses of the users or groups you want to add.
4. Assign the role:
   - Click **Assign roles** and search for the **Title** of the custom role you created in the previous section.
   - Select the role.
5. Click **Save**.