---
schema_version: "1"
id: 0ad9ac27b813009fb1e839a7ab4c0b80ba50e6b6727e5a0e459aabad270436a6
title: InvocationContext Enum
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_enum_Auth_InvocationContext.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_enum_Auth_InvocationContext.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 98f0f6bd9906b19164eeb31aab07ecf32bdb6cbb61de8186e47bd7c78dbfab6d
description: The context in which the connected app is invoked, such as the protocol flow used and the token type issued, if any. Developers can use the context information to write code that is unique to the type of invocation.
---
# InvocationContext Enum

The context in which the connected app is invoked, such as the protocol flow used and the token type issued, if any. Developers can use the context information to write code that is unique to the type of invocation.

## Enum Values

The following are the values of the Auth.InvocationContext enum.

| Value | Description |
| --- | --- |
| ASSET\_TOKEN | Reserved for future use. |
| OAUTH1 | Context used when authentication is through ​an OAuth 1.0A flow. |
| OAUTH2\_JWT\_BEARER\_TOKEN | Context used when authentication is through a JSON-based Web Token (JWT) bearer token flow. |
| OAUTH2\_SAML\_ASSERTION | Context used when authentication is through an OAuth 2.0 SAML assertion flow. |
| OAUTH2\_SAML\_BEARER\_ASSERTION | Context used when authentication is through an OAuth 2.0 SAML bearer assertion flow. |
| OAUTH2\_USERNAME\_PASSWORD | Context used when authentication is through an OAuth 2.0 username-password flow. |
| OAUTH2\_USER\_AGENT\_ID\_TOKEN | Context used when issuing an ID token through an OAuth 2.0 user-agent flow. |
| OAUTH2\_USER\_AGENT\_TOKEN | Context used when authentication is through an OAuth 2.0 user agent flow. |
| OAUTH2\_WEB\_SERVER | Context used when authentication is through a web server authentication flow. |
| OPENIDCONNECT | Context used when authentication is through an OpenID Connect authentication flow. |
| REFRESH\_TOKEN | Context used when renewing tokens issued by a web server or user-agent flow. |
| SAML\_ASSERTION | Context used when authentication is through a SAML assertion flow. |
| UNKNOWN | Context is unknown. |
| USERID\_ENDPOINT | Context used when issuing an access token through a UserInfo endpoint. |

#### See Also

- [Salesforce Help: Authenticating Apps with OAuth](https://help.salesforce.com/apex/HTViewHelpDoc?id=remoteaccess_authenticate.htm&language=en_US "Salesforce Help: Authenticating Apps with OAuth - html (New Window)")