This document explains how to view Secure Access Connect realms and
realm details.

## Required roles


To get the permissions that
you need to view realm details,

ask your administrator to grant you the
[Compute Network Viewer](https://docs.cloud.google.com/iam/docs/roles-permissions/compute.md.txt#compute.networkViewer) (`roles/compute.networkViewer`) IAM role on your project.


For more information about granting roles, see [Manage access to projects, folders, and organizations](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt).


You might also be able to get
the required permissions through [custom
roles](https://docs.cloud.google.com/iam/docs/creating-custom-roles) or other [predefined
roles](https://docs.cloud.google.com/iam/docs/roles-overview#predefined).

## View all realms in a project

To view all realms in a project, do the following.

### Console

1. In the Google Cloud console, go to the **Secure Access Connect Realms**
   page.

   [Go to Secure Access Connect Realms](https://console.cloud.google.com/net-security/sac/realms)
2. On the top left, choose the project that you want to view realms for. The
   realms are displayed on the page.

### gcloud

Run the
[`gcloud network-security secure-access-connect realms list` command](https://docs.cloud.google.com/sdk/gcloud/reference/network-security/secure-access-connect/realms/list).

      gcloud network-security secure-access-connect realms list \
          --project=PROJECT_ID

Replace `PROJECT_ID` with your project ID.

### API

Use the [`projects.locations.sacRealms.list` method](https://docs.cloud.google.com/secure-access-connect/docs/reference/network-security/rest/v1beta1/projects.locations.sacRealms/list.md.txt)

    GET https://networksecurity.googleapis.com/v1/project/PROJECT_ID/locations/global/sacRealms

Replace `PROJECT_ID` with your project ID.

## View realm details

To view the details of a specific realm, do the following.

### Console

1. In the Google Cloud console, go to the **Secure Access Connect Realms**
   page.

   [Go to Secure Access Connect Realms](https://console.cloud.google.com/net-security/sac/realms)
2. Click the realm that you want to view details for.

### gcloud

Run the
[`gcloud network-security secure-access-connect realms describe` command](https://docs.cloud.google.com/sdk/gcloud/reference/network-security/secure-access-connect/realms/describe):

      gcloud network-security secure-access-connect realms describe REALM_ID \
          --project=PROJECT_ID

Replace the following:

- `REALM_ID`: the ID of the realm
- `PROJECT_ID`: your project ID

### API

Use the [`projects.locations.sacRealms.get` method](https://docs.cloud.google.com/secure-access-connect/docs/reference/network-security/rest/v1beta1/projects.locations.sacRealms/get.md.txt)

    GET https://networksecurity.googleapis.com/v1/project/PROJECT_ID/locations/global/sacRealms/REALM_ID

Replace the following:

- `PROJECT_ID`: your project ID
- `REALM_ID`: the ID of the realm