# Configure OneDrive Web API Service

## Content

To configure OneDrive Web API Service and perform different operations, follow these steps:

1. [Configure Storage Connection String](/componentone/docs/webapi/online-webapi/Services/cloudservices/configureonedriveservice#step-1-configure-storage-connection-string)
2. [Register the Cloud Service](/componentone/docs/webapi/online-webapi/Services/cloudservices/configureonedriveservice#step-2-register-the-cloud-service)
3. [Perform Operations](/componentone/docs/webapi/online-webapi/Services/cloudservices/configureonedriveservice#step-3-perform-operations)

### Step 1: Configure Storage Connection String

1. Register your app on OneDrive. For registering app, see [Register your app](https://docs.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/msa-oauth?view=odsp-graph-online#register-your-app).
2. Generate an access token. For detailed information on how to obtain access token, see [Supported Authentication flows](https://docs.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/msa-oauth?view=odsp-graph-online#supported-authentication-flows).

### Step 2: Register the Cloud Service

1. Create a new C1 Web API Application and make sure the following references are added to the application:
    * C1.Web.Api.dll
    * C1.Web.Api.Cloud.dll
    * OneDrive.Api
2. Register the OneDrive cloud service using the following code:

    ```CODE
    app.UseStorageProviders().AddOneDriveStorage("OneDrive", “your one drive AccessToken”);
    ```

### Step 3: Perform Operations

You can choose to perform various operations, such as listing data, uploading, deleting or downloading a file, after registering the cloud service. To understand how to perform these operations, see [Perform Operations](/componentone/docs/webapi/online-webapi/Services/cloudservices/performoperations).