> For the complete documentation index, see [llms.txt](https://docs.prismacloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.prismacloud.io/admin-guide/authentication/oauth2-github.md).

# GitHub (OAuth 2.0)

Prisma Cloud supports OAuth 2.0 as an authentication mechanism. GitHub users can log into Prisma Cloud Console using GitHub as an OAuth 2.0 provider.

Prisma Cloud supports the authorization code flow only.

A CA certificate configured in **Manage > Authentication > System certificates > Certificate-based authentication to Console** is not supported in GitHub.

## Configure Github as an OAuth provider

Create an OAuth App in your GitHub organization so that users in the organization can log into Prisma Cloud using GitHub as an OAuth 2.0 provider.

1. Log into GitHub as the organization owner.
2. Go to **Settings > Developer Settings > OAuth Apps**, and click **New OAuth App** (or **Register an application** if this is your first app).
3. In **Application name**, enter **Prisma Cloud**.
4. In **Homepage URL**, enter the URL for Prisma Cloud Console in the format https\://\<CONSOLE>:\<PORT>.
5. In **Authorization callback URL**, enter https\://\<CONSOLE>:\<PORT>/api/v1/authenticate/callback/oauth.
6. Click **Register application**.
7. Copy the **Client ID** and **Client Secret**, and set them aside setting up the integration with Prisma Cloud.

   <figure><img src="/files/erxqDVGxEqZsySZ8tE6l" alt="oauth2 github oauth app"><figcaption></figcaption></figure>

## Integrate Prisma Cloud with GitHub

Set up the integration so that GitHub users from your organization can log into Prisma Cloud.

1. Log into Prisma Cloud Console.
2. Go to **Manage > Authentication > Identity Providers > OAuth 2.0**.
3. Set **Integrate Oauth 2.0 users and groups with Prisma Cloud** to **Enabled**.
4. Set **Identity provider** to **GitHub**.
5. Set **Client ID** and **Client secret** to the values you copied from GitHub.
6. Set **Auth URL** to **<https://github.com/login/oauth/authorize>**.
7. Set **Token URL** to **<https://github.com/login/oauth/access\\_token>**.
8. Click **Save**.

## Prisma Cloud to GitHub user identity mappings

Create a Prisma Cloud user for each GitHub user that should have access to Prisma Cloud.

After the user is authenticated, Prisma Cloud uses the access token to query GitHub for the user’s information (user name, email). The user information returned from GitHub is compared against the information in the Prisma Cloud Console database to determine if the user is authorized. If so, a JWT token is returned.

1. Go to **Manage > Authentication > Users**.
2. Click **Add User**.
3. Set **Username** to the GitHub user name.
4. In the **Description** field, enter additional details about the user (optional).
5. Set **Auth method** to **OAuth**.
6. Select a [role](/admin-guide/authentication/user-roles.md) for the user.
7. Click **Save**.
8. Test logging into Prisma Cloud Console.
   1. Logout of Prisma Cloud.
   2. On the login page, select **OAuth**, and then click **Login**.

      <figure><img src="/files/fJOXu2fNFqj1bo3bi0EL" alt="oauth2 login"><figcaption></figcaption></figure>
   3. Authorize the Prisma Cloud OAuth App to sign you in.

      <figure><img src="/files/Tsc1nJIiGavaS0zsyUMT" alt="oauth2 github authorization"><figcaption></figcaption></figure>

### Prisma Cloud group to GitHub organization mappings

Use groups to streamline how Prisma Cloud roles are assigned to users. When you use groups to assign roles, you don’t have to create individual Prisma Cloud accounts for each user.

Groups can be associated and authenticated with by multiple identity providers.

1. Go to **Manage > Authentication > Groups**.
2. Click **Add Group**.
3. In **Name**, enter the GitHub organization.
4. In **Authentication method**, select **External Providers**.
5. In **Authentication Providers**, select **OAuth group**.
6. Select a [role](/admin-guide/authentication/user-roles.md) for the members of the organization.
7. Click **Save**.
8. Test logging into Prisma Cloud Console.
   1. Logout of Prisma Cloud.
   2. On the login page, select **OAuth**, and then click **Login**.

      <figure><img src="/files/fJOXu2fNFqj1bo3bi0EL" alt="oauth2 login"><figcaption></figcaption></figure>
   3. Authorize the Prisma Cloud OAuth App to sign you in.

      <figure><img src="/files/Tsc1nJIiGavaS0zsyUMT" alt="oauth2 github authorization"><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.prismacloud.io/admin-guide/authentication/oauth2-github.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
