Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Contact Us
  • Home
  • API, CLI, and SDK Documentation
  • REST API Documentation
  • Connections Using REST API
  • Platform Specific REST API Documentation
  • Microsoft

Microsoft One Drive for Business (REST API)

Create a Microsoft One Drive for Business connection using the DryvIQ REST API.

Written by Andrea Harvey

Updated at May 2nd, 2025

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Insights
    Prebuilt Insights Custom Insights
  • Content
  • Accounts
  • Activity Log
  • Content Scans
  • Migrations
    Migration Jobs Migration Reports Maps Flagged Items Migration Tools
  • Connections
    Supported Platform Connections Creating Connections Connection Maintenance Connection Pools
  • Entity Types
    DryvIQ Available Entity Types Custom Entity Types Entity Type Maintenance
  • Action Sets
    Creating Action Sets Action Sets Maintenance
  • Settings
    License Performance Notifications Extensions Entity Types Settings Display Settings Configuration
  • API, CLI, and SDK Documentation
    REST API Documentation Command-line Interface SDK Development
  • POC Offering
  • Release Notes
+ More

Table of Contents

Creating a Connection Creating a Job Using Impersonation

Creating a Connection

You will need to add the relevant connection information to the GET request. The following GET request will return a Microsoft login link. Use this link to complete logging into your account and grant DryvIQ access to it.

GET {{url}}v1/connections/platforms/onedrive-business-graph/new?domain={{YOUR URL}}&name={{YOUR CONNECTION NAME}}&client_id={{YOUR CLIENT ID}}&client_secret={{YOUR CLIENT SECRET}}

Creating a Job Using Impersonation

As a OneDrive for Business administrator, you can impersonate a user using the path that relates to their content. Then, use their information in the impersonate_as block. (See Impersonation for more information on how to impersonate users.)

POST {{url}}v1/jobs
{
 "name":"Basic job with impersonation",
 "kind": "transfer",
 "transfer": {
   "audit_level": "trace",
     "transfer_type": "copy",
     "source": {
       "connection": { "id": "{{nfs_source_connectionID}}" },
       "target": {
         "path": "/sourcePath" 
       }
     },
     "destination": {
       "connection": { "id": "{{OneDriveforBusiness_destination_connectionID}}" },
       "impersonate_as": {
           "id": "00",
           "name": "Joe Smith",
           "email": "jsmith@company.onmicrosoft.com"
       },
       "target": {
         "path": "/destinationPath"
       }
     },
       "simulation_mode": false
   },
   "schedule": {
       "mode": "manual"
   },
   "stop_policy": {
       "on_success": 5,
       "on_failure": 5,
       "on_execute": 25
   },
   "category": {
     "name": "Report | Impersonation Job Examples"
   }
}

 

microsoft api rest api onedrive connection

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Dropbox for Business (REST API)
  • Dropbox (REST API)
  • Microsoft Teams (REST API)

Copyright 2025 – DryvIQ, Inc.

Knowledge Base Software powered by Helpjuice

Expand