Organizations with Modern Authentication and Legacy Protocols
You can add Microsoft Office 365 organizations using modern authentication and MFA-enabled service account with enabled legacy protocols.
Request
Request Headers
The request header must contain an authorization token of the current session.
Request Parameters
None.
Request Body
The following table lists available request properties:
Property | Type | Description |
---|---|---|
type | string | Sets the type of the organization you add that can be one of the following:
|
region | string | Sets Microsoft Azure region that can be one of the following:
|
isExchangeOnline | boolean | Defines whether to add an Exchange Online organization. |
isSharePointOnline | boolean | Defines whether to add a SharePoint Online organization. |
isTeamsOnline | boolean | Defines whether the added organization uses Microsoft Teams. If set to true, you will be able to back up Microsoft Teams data for this organization. |
exchangeOnlineSettings | Sets the ExchangeOnlineSettings object. | |
sharePointOnlineSettings | Sets the SharePointOnlineSettings object. |
Property | Type | Description |
---|---|---|
account | string | Sets the user account with enabled MFA. |
password | string | Sets the password for the specified user. |
grantAdminAccess | boolean | Defines whether to grant administrative permissions. |
useMfa | boolean | Defines whether to use multi-factor authentication. |
applicationId | string | Sets the identification number of the Azure AD application that you want to use to access your Office 365 organization. |
applicationSecret | string | Sets the application secret for the specified Azure AD application. Use either applicationSecret or applicationCertificate. |
applicationCertificate | string | Sets the Base64 string of an SSL certificate that you want to use to access the Azure AD application. Use either applicationSecret or applicationCertificate. For more information on how to obtain a Base64 string, see Converting Certificate to Base64 String. |
sharePointOnlineSettings Objects
Property | Type | Description |
---|---|---|
account | string | Sets the user account with enabled MFA. |
password | string | Sets the password for the specified user. |
grantAdminAccess | boolean | Defines whether to grant administrative permissions. |
useMfa | boolean | Defines whether to use multi-factor authentication. |
applicationId | string | Sets the identification number of the Azure AD application that you want to use to access your Office 365 organization. |
applicationSecret | string | Sets the application secret for the specified Azure AD application. Use either applicationSecret or applicationCertificate. |
applicationCertificate | string | Sets the Base64 string of an SSL certificate that you want to use to access the Azure AD application. Use either applicationSecret or applicationCertificate. For more information on how to obtain a Base64 string, see Converting Certificate to Base64 String. |
Converting Certificate to Base64 String
To do this, you can use the following PowerShell cmdlets:
$pfx_cert = get-content '<path_to_cert>' -Encoding Byte [System.Convert]::ToBase64String($pfx_cert) | Out-File '<path_to_file>' |
- <path_to_cert> — path to the PFX file that you want to convert to a Base64 string.
- <path_to_file> — path to a file that that will contain the resulting Base64 string. You will be able to copy the Base64 string from the file and provide the string in the body of a request to Veeam Backup for Microsoft Office 365 REST API.
$pfx_cert = get-content 'C:\cert.pfx' -Encoding Byte [System.Convert]::ToBase64String($pfx_cert) | Out-File 'C:\base64.txt' |
Request: POST https://<hostname>:4443/v5/Organizations
Request Header: Authorization: Bearer <Access-Token> Request Body: { "type": "Office365", "region": "Worldwide", "isExchangeOnline": true, "isSharePointOnline": true, "sharePointOnlineSettings": { "account": "administrator@abc.onmicrosoft.com", "password": "hnwgwrbmemwkjcfm", "grantAdminAccess": true, "useMfa": true, "applicationId":"63caebf0-2624-48d0-9ece-de1db611dc98", "applicationSecret":"5dHpLX5UWMMiPb+wUF+0dD980Dc5rWevYeVTU18c5TE=" }, "exchangeOnlineSettings": { "account": "administrator3@abc.onmicrosoft.com", "password": "hnwgwrbmgmskjcfm", "grantAdminAccess": true, "useMfa": true, "applicationId":"63caebf0-2624-48d0-9ece-de1db611dc98", "applicationSecret":"5dHpLX5UWMMiPb+wUF+0dD980Dc5rWevYeVTU18c5TE=" } } |
The server returns the following response to the client.
A successfully completed operation returns a response code 201 Created.
Header | Description |
---|---|
Content-length | The length of the response body. |
Content-type | The media type and syntax of the response body message: application/json; charset=utf-8 |
The response contains the following information:
Property | Type | Description |
---|---|---|
exchangeOnlineSettings | object | Shows the configuration of the Exchange Online organization. |
sharePointOnlineSettings | object | Shows the configuration of the SharePoint Online organization. |
type | string | Shows the type of the organization that can be one of the following:
|
region | string | Shows the Microsoft Azure region. |
isExchangeOnline | boolean | Shows if the Exchange Online organization is added. |
isSharePointOnline | boolean | Shows if the SharePoint Online organization is added. |
isTeamsOnline | boolean | Shows if the added organization uses Microsoft Teams. If set to true, you will be able to back up Microsoft Teams data for this organization. |
id | string | Shows the identification number of the Office 365 organization. |
name | string | Shows the name of the organization in Veeam Backup for Microsoft Office 365. |
officeName | string | Shows the Office 365 Online name. |
isBackedup | string | Shows if the organizations has backups. |
firstBackuptime | string | Shows when the first backup was created for the organization. |
lastBackuptime | string | Shows when the last backup was created for the organization. |
_links | Dictionary of string [key] and Object [value] | Links to related resources (navigation property). |
Response: 201 Created
Response Body: { "isTeamsOnline": true, "exchangeOnlineSettings": { "useApplicationOnlyAuth": false, "officeOrganizationName": "abc.onmicrosoft.com", "account": "administrator@abc.onmicrosoft.com", "grantAdminAccess": true, "useMfa": true, "applicationId": "63caebf0-2624-48d0-9ece-de1db611dc98" }, "sharePointOnlineSettings": { "useApplicationOnlyAuth": false, "officeOrganizationName": "abc.onmicrosoft.com", "sharePointSaveAllWebParts": false, "account": "administrator@abc.onmicrosoft.com", "grantAdminAccess": true, "useMfa": true, "applicationId": "63caebf0-2624-48d0-9ece-de1db611dc98" }, "type": "Office365", "region": "Worldwide", "isExchangeOnline": true, "isSharePointOnline": true, "id": "7f9a9b85-50e7-4f61-8f76-6a9517b8677d", "name": "abc.onmicrosoft.com", "officeName": "abc.onmicrosoft.com", "isBackedup": false, "_links": { "self": {"href": "https://epsilon.tech.local:4443/v5/organizations/7f9a9b85-50e7-4f61-8f76-6a9517b8677d"}, "jobs": {"href": "https://epsilon.tech.local:4443/v5/organizations/7f9a9b85-50e7-4f61-8f76-6a9517b8677d/jobs"}, "groups": {"href": "https://epsilon.tech.local:4443/v5/organizations/7f9a9b85-50e7-4f61-8f76-6a9517b8677d/groups"}, "users": {"href": "https://epsilon.tech.local:4443/v5/organizations/7f9a9b85-50e7-4f61-8f76-6a9517b8677d/users"}, "sites": {"href": "https://epsilon.tech.local:4443/v5/organizations/7f9a9b85-50e7-4f61-8f76-6a9517b8677d/sites"}, "usedRepositories": {"href": "https://epsilon.tech.local:4443/v5/organizations/7f9a9b85-50e7-4f61-8f76-6a9517b8677d/usedRepositories"} }, "_actions": {} } |