Dynamics 365 Instance Backup to Azure Storage

Microsoft recently released the Dynamics 365 Customer Engagement Online Management API which enables you to programmatically manipulate your Dynamics 365 instance (almost everything you can do from the Dynamics 365 Admin Center) including backing-up your instance to Azure storage.

The InstanceBackups POST operation contains an IsAzureBackup boolean parameter which, in conjunction with the AzureStorageInformation parameter, copies your Dynamics 365 backup to a designated Azure Storage.

Your post request will look like the following:

POST https://admin.services.crm.dynamics.com/api/v1/InstanceBackups

Header
Content-Type: application/json
Authorization: Bearer <OAuth Token>

Body
{
“InstanceId”: “<your instance GUID>”,
“Label”: “My first Azure backup”,
“Notes”: “An instance backup to Azure Storage”,
“IsAzureBackup”: “true”,
“AzureStorageInformation”: {
“ContainerName”: “<AzureStorageContainer>”,
“StorageAccountKey”: “<AzureStorageAccountKey>”,
“StorageAccountName”: “<AzureStorageAccountName>”
}
}

You can then monitor your request progress by calling the GET https://admin.services.crm.dynamics.com/api/v1/Operation/<OperationGuid> operation
Make sure you select the correct service URL as described in the documentation.
Once your backup is successful it is available for an entire year.

Dynamics 365 Admin Center description with Save to Azure Storage

In my next post I’ll delve into how to construct your request and if time permits create a sample console application to schedule daily backups.

Rami Mounla

2 thoughts on “Dynamics 365 Instance Backup to Azure Storage

Leave a Reply

Your email address will not be published. Required fields are marked *