{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":1193,"path":"api-reference/web-services/c_OAuthProviderAndScope.md","title":"OAuth profiles and scopes","bundle":null,"doc_type":null,"release":"australia","body":"\n# OAuth profiles and scopes\n\nIn the OAuth provider scenario, profiles and scopes specify the grant type, authorization type, and level of access.\n\nIn the OAuth provider scenario, the OAuth profile refers to a combination of a grant type and at least one scope. The scope specifies the access that the user has to the protected resource, such as **read** or **write**. You can create a profile for each third-party provider and obtain the specific set of scopes from the provider. See [Specify an OAuth profile](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/web-services/t_SpecifyAnOAuthProfile.md) and [Specify an OAuth scope](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/web-services/t_SpecifyAnOAuthScope.md) for more information. The instance also uses OAuth profiles when a REST call specifies OAuth 2.0 authentication. The instance auto-creates a default profile for each third-party provider record that you create. There can be only one default profile.\n\nSpecify the following parameters, which are saved in the OAuth Requestor Profile \\[OAuth\\_requestor\\_profile\\] table:\n\n|Parameter|Description|\n|---------|-----------|\n|`oauth_requestor`|The sys\\_id of the object, which can be a user record or an email account.|\n|`oauth_requestor_context`|Descriptor that provides context for the OAuth requestor. As a good practice, use the name of the table where the `oauth_requestor` object is saved.|\n|`oauth_provider_profile`|The sys\\_id of the OAuth profile record that is the default \\(see [Specify an OAuth profile](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/web-services/t_SpecifyAnOAuthProfile.md)\\).|\n\nWhen the user attempts to authenticate, the provider accesses the OAuth Requestor Profile table to look for the user. If the user is found, the authentication is successful. If not, the provider accesses the default profile to determine the grant type and how to proceed with the authentication.\n\n-   **[Specify an OAuth profile](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/web-services/t_SpecifyAnOAuthProfile.md)**  \nAn OAuth profile includes the grant type that the third-party OAuth provider needs to obtain access to the restricted resource.\n-   **[Specify an OAuth scope](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/web-services/t_SpecifyAnOAuthScope.md)**  \nSpecify the OAuth scopes that you get from the provider. Scopes can be any level of access specified by the provider, such as read, write, or any string, including a URL.\n\n**Parent Topic:**[Use a third-party OAuth provider](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/web-services/t_UseAThirdPartyOAuthProvider.md)\n\n"}}