| title | Create sharePointMigrationJob |
|---|---|
| description | Create a new sharePointMigrationJob object that is scheduled to run at a later time to migrate content from an intermediary storage to the target fileStorageContainer. |
| author | wenzhou |
| ms.date | 11/17/2025 |
| ms.localizationpriority | medium |
| ms.subservice | onedrive |
| doc_type | apiPageType |
Namespace: microsoft.graph
Create a new sharePointMigrationJob object that is scheduled to run at a later time to migrate content from an intermediary storage to the target fileStorageContainer.
[!INCLUDE national-cloud-support]
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
[!INCLUDE permissions-table]
POST /storage/fileStorage/containers/{fileStorageContainerId}/migrationJobs| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-Type | application/json. Required. |
In the request body, supply a JSON representation of the sharePointMigrationContainerInfo object.
You can specify the following properties when you create a sharePointMigrationContainerInfo object.
| Property | Type | Description |
|---|---|---|
| containerInfo | sharePointMigrationContainerInfo | The intermediate storage to temporarily store the file content and metadata. Required. |
If successful, this method returns a 201 Created response code and a sharePointMigrationJob object in the response body.
The following example shows how to create a sharePointMigrationJob that runs on the fileStorageContainer identified by the container ID b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z.
POST https://graph.microsoft.com/v1.0/storage/fileStorage/containers/b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z/migrationJobs
Content-Type: application/json
{
"containerInfo": {
"dataContainerUri": "https://spoxxx.blob.core.windows.net/data?sp=rw&sig=",
"metadataContainerUri": "https://spoxxx.blob.core.windows.net/metadata?sp=rw&sig=",
"encryptionKey": "base64 encoded key for AES-256-CBC encryption"
}
}[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "31090ce2-3b99-fa40-7ec5-46ebeeb5900b"
}