A connected app integrates an application with Salesforce using APIs. Connected apps use standard SAML and OAuth protocols to authenticate, provide single sign-on, and provide tokens for use with Salesforce APIs. In addition to standard OAuth capabilities, connected apps allow Salesforce admins to set various security policies and have explicit control over who can use the corresponding apps. Each time that a user grants access to an application, the application obtains a new access token.
describeSObjects(), query()
If you are a user with the “Manage Users” permission, you see all tokens for all users in the organization. Otherwise, you see only your own tokens.
Field Name | Details |
---|---|
AccessToken |
|
AppMenuItemId |
|
AppName |
|
DeleteToken |
|
Id |
|
LastUsedDate |
|
RequestToken |
|
UseCount |
|
UserId |
|
To delete an AccessToken, send a request to the revoke OAuth token endpoint with the DeleteToken as the parameter. For example, this URL https://login.salesforce.com/services/oauth2/revoke?token=(the Delete Token) causes the deletion of the token.
In API version 34.0 and later, this object was enhanced to help manage high instance counts. A query() call returns up to 500 rows. A queryMore() call returns 500 more, up to 2500 total. No more records are returned after 2500. To make sure you don’t miss any records, issue a COUNT() query in a SELECT clause for OauthToken. This gives you the total number of records. If there are more than 2500 records, divide your query by filtering on fields, like UserId, to return subsets of less than 2500 records.