**Source URL:** https://limited.veevavault.dev/qualityone/vault-api/api-reference/20.1/authentication/oauth-20-openid-connect.md

# OAuth 2.0 / OpenID Connect



Authenticate your account using OAuth 2.0 / Open ID Connect token to obtain a Vault Session ID. Learn more about [OAuth 2.0 / Open ID Connect in Vault Help](https://platform.veevavault.help/en/lr/43329).

When requesting a `sessionId`, Vault allows the ability for Oauth2/OIDC client applications to pass the `client_id` with the request. Vault uses this `client_id` when talking with the introspection endpoint at the authorization server to validate that the `access_token` presented by the application is valid. Learn more about [Client ID in the REST API Documentation](/vault-api/references/client-id).

<Endpoint path="https://login.veevavault.com/auth/oauth/session/{oath_oidc_profile_id}" method="POST"></Endpoint>

## Headers {#headers}

<FieldTable>
| Name | Description |
| --- | --- |
| `Authorization` | Bearer access_token |
| `Accept` | application/json (default) |
</FieldTable>

## URI Path Parameters {#uri-path-parameters}

<FieldTable>
| Name | Description |
| --- | --- |
| `oath_oidc_profile_id` | The ID of your OAuth2.0 / Open ID Connect profile. |
</FieldTable>

## Body Parameters {#body-parameters}

## Request {#request}

<CodeExample title="">
```
curl -X POST \
-H "Authorization: Bearer 1C29326C3DF" \
-H "Host: Bearer 1C29326C3DF" \
https://myserver.com/auth/oauth/session/_9ad0a091-cbd6-4c59-ab5a-d4f2870f218c

```
</CodeExample>

## Response {#response}

<CodeExample title="">
```
{
  "responseStatus": "SUCCESS",
  "sessionId": "3B3C45FD240E26F0C3DB4F82BBB0C15C7EFE4B29EF9916AF41AF7E44B170BAA01F232B462BE5C2BE2ACB82F6704FDA216EBDD69996EB23A6050723D1EFE6FA2B",
  "userId": 12021,
  "vaultIds": [
    {
      "id": 1776,
      "name": "PromoMats",
      "url": "https://promomats-veevapharm.veevavault.com/api"
    },
    {
      "id": 1777,
      "name": "eTMF",
      "url": "https://etmf-veevapharm.veevavault.com/api"
    },
    {
      "id": 1779,
      "name": "QualityDocs",
      "url": "https://qualitydocs-veevapharm.veevavault.com/api"
    }
  ],
  "vaultId": 1776
}

```
</CodeExample>

---

**Previous:** [User Name and Password](/qualityone/vault-api/api-reference/20.1/authentication/user-name-and-password)  
**Next:** [Retrieve API Versions](/qualityone/vault-api/api-reference/20.1/authentication/retrieve-api-versions)