Skip to main content

Authorization Agents and Data Providers

  • 4 minutes to read

Authorization agents are non-visual components that identify your application to an online account and perform all necessary authentication and authorization operations on behalf of an end-user. Each authorization agent component is designed to work together with one or more data providers that implement resource access and management routines specific for a target online service type. There are data providers implemented as parts of the DevExpress products that support online data access and synchronization and independent user information providers that can only retrieve the user display name and e-mail from supported online service accounts.

Call the TdxAuthorizationAgentUser.GetUserInfo class function passing the required authorization agent component as a parameter to create an independent user information provider. The function automatically creates a compatible data provider and associates it with the specified authorization agent.

All DevExpress controls and components that support interaction with online services, use one active data provider at a time to access and synchronize resources with an account of the online service it supports. Each DevExpress product with the online data synchronization functionality automatically creates the provider you select via the dedicated ProviderClass or ProviderClassName property. Then you can use the AuthorizationAgent property to associate the provider with the compatible authorization agent.

Product

Data Provider-Related Properties

ExpressScheduler Suite

Cloud Storage Component

The following table lists account types supported by OAuth 2.0-compatible authorization agents and the corresponding data providers:

Supported Online Service Type

Authorization Agent Component

Compatible Data Providers

Google Authorization Agent Icon

Google

TdxGoogleAPIOAuth2AuthorizationAgent

TdxGoogleAPIOAuth2AuthorizationAgentUserInfo

An independent user information provider that can obtain user display name and e-mail from a connected Google account.

TcxSchedulerWebServiceStorageGoogleProvider

The Google API-compatible event data provider designed to read and manage user events for the online persistence manager in the ExpressScheduler Suite.

TdxCloudStorageGoogleDriveProvider

The Google API-compatible data provider designed to access and synchronize files stored on a Google Drive server. Use this provider with the TdxCloudStorage component.

Microsoft Graph Authorization Agent Icon

Microsoft

TdxMicrosoftGraphAPIOAuth2AuthorizationAgent

TdxMicrosoftGraphAPIOAuth2AuthorizationAgentUserInfo

An independent user information provider that can obtain user display name and e-mail from a connected Microsoft account.

TcxSchedulerWebServiceStorageOfficeProvider

The Microsoft Graph® API-compatible event data provider designed to read and manage user events for the online persistence manager in the ExpressScheduler Suite.

TdxCloudStorageMicrosoftOneDriveProvider

The Microsoft Graph® API-compatible event data provider designed to access and synchronize files stored on a Microsoft OneDrive® server. Use this provider with the TdxCloudStorage component.

To configure an OAuth 2.0-compatible authorization agent component associated with an online data provider, you need to:

  1. Register your client application with the online service corresponding to the authorization agent component type:
Online Data Access API How to Register a Native Application
Google API https://developers.google.com/identity/protocols/oauth2?hl=en
Microsoft Graph® API https://docs.microsoft.com/en-us/graph/auth-register-app-v2
  1. Assign the URI required to receive an OAuth 2.0 account access token to the RedirectUri property. Refer to the property description for detailed information on specific settings for all supported online service providers.

  2. Use the UserAgent property to specify how your application identifies itself to an OAuth 2.0 server on authorization.

  3. Handle the OnError event to receive and process information on any authorization and authentication errors.

Then, you can attempt to connect your application to the target online account by setting the corresponding Connect property to True:

Product Connection Session Management Property
ExpressScheduler Suite The event data provider‘s Connected property.
Cloud Storage Component The component’s Connected property.