New-VBOOffice365ConnectionSettings
Short Description
Defines connection settings to access Microsoft Office 365 organizations.
Syntax
This cmdlet provides the following parameter sets.
- Defines connection settings to access Microsoft Office 365 organizations using basic authentication:
New-VBOOffice365ConnectionSettings -Credential <pscredential> [-GrantRolesAndPermissions] [<CommonParameters>] |
- Defines connection settings to access Microsoft Office 365 organizations using modern authentication with an application secret:
New-VBOOffice365ConnectionSettings -AppCredential <pscredential> -ApplicationId <guid> -ApplicationSecret <securestring> [-GrantRolesAndPermissions] [<CommonParameters>] |
- Defines connection settings to access Microsoft Office 365 organizations using modern authentication with an application certificate:
New-VBOOffice365ConnectionSettings -AppCredential <pscredential> -ApplicationId <guid> -ApplicationCertificatePath <string> [-GrantRolesAndPermissions] [-ApplicationCertificatePassword <securestring>] [<CommonParameters>] |
Detailed Description
This cmdlet defines connection settings to access Microsoft Office 365 organizations. You can apply these settings to add Microsoft Office 365 organizations to Veeam Backup for Microsoft Office 365 infrastructure.
The cmdlet will create the VBOOffice365ConnectionSettings object that contains connection settings with the authentication of the following types:
- Basic authentication
- Modern authentication with an application secret
- Modern authentication with an application certificate
Run the Add-VBOOrganization cmdlet to add Microsoft organizations to Veeam Backup for Microsoft Office 365 infrastructure.
Parameters
Parameter | Description | Required | Position | Accept | Accept |
AppCredential | For the modern authentication type. Specifies credentials. The cmdlet will use these credentials to connect to a Microsoft Office 365 organization. | True | Named | False | False |
ApplicationCertificatePassword | For the modern authentication type. Specifies an application password. The cmdlet will use these credentials to connect to a Microsoft Office 365 organization. | False | Named | False | False |
ApplicationCertificatePath | For the modern authentication type. Specifies the path to the application certificate. The cmdlet will use this path to get the application certificate and to connect to a Microsoft Office 365 organization. | True | Named | False | False |
ApplicationId | For the modern authentication type. Specifies an application ID. The cmdlet will use an application ID to connect to a Microsoft Office 365 organization. | True | Named | False | False |
ApplicationSecret | For the modern authentication type. Specifies an application secret. The cmdlet will use an application secret to connect to a Microsoft Office 365 organization. | True | Named | False | False |
Credential | Specifies credentials. The cmdlet will use these credentials to connect to a Microsoft Office 365 organization. | True | Named | False | False |
GrantRolesAndPermissions | Indicates that the cmdlet will grant required permissions and assign appropriate roles to the account. | False | Named | False | False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.
Example 1
This example shows how to create Microsoft Office 365 organization connection settings with the basic authentication:
- Run Get-Credential to create a credential object. Enter credentials you want to use for authenticating with a Microsoft Office 365 organization. Save the result to the $Credentials variable.
- Run New-VBOOffice365ConnectionSettings with the $Credentials variable and a GrantRolesAndPermissions parameter to create connection settings with all the necessary permissions and roles granted to the authenticated user.
$Credentials = Get-Credential New-VBOOffice365ConnectionSettings -Credential $Credentials -GrantRolesAndPermissions |
Example 2
This example shows how to create Microsoft Office 365 organization connection settings with a modern authentication with an application secret:
- Run Get-Credential to create a credential object. Enter credentials you want to use for authenticating with a Microsoft Office 365 organization. Save the result to the $Credentials variable.
- Run ConvertTo-SecureString with the AsPlainText parameter to turn the ApplicationSecret into SecureString type. Save the result to the $ApplicationSecret variable.
- Run New-VBOOffice365ConnectionSettings with the $Credentials variable and a GrantRolesAndPermissions parameter to create connection settings with all the necessary permissions and roles granted to the authenticated user.
$Credentials = Get-Credential $ApplicationSecret = ConvertTo-SecureString -String "fCblKbIf+kY10+uB+rROD+wZPT/WxcDNX+EU2O33Q1s=" -AsPlainText -Force New-VBOOffice365ConnectionSettings -AppCredential $Credentials -ApplicationId d052f06e-1cfa-42ff-9636-9da5e7aa1fd1 -ApplicationSecret $ApplicationSecret -GrantRolesAndPermissions |
Example 3
This example shows how to create Microsoft Office 365 organization connection settings with a modern authentication with an application certificate:
- Run Get-Credential to create a credential object. Enter credentials you want to use for authenticating with a Microsoft Office 365 organization. Save the result to the $Credentials variable.
- Run ConvertTo-SecureString with the AsPlainText parameter to turn the ApplicationCertificatePassword into SecureString type. Save the result to the $ApplicationCertificatePassword variable.
- Run New-VBOOffice365ConnectionSettings with the $Credentials and $ApplicationCertificatePassword variables and a GrantRolesAndPermissions parameter to create the connection settings with all the necessary permissions and roles granted to the authenticated user.
$Credentials = Get-Credential $ApplicationCertificatePassword = ConvertTo-SecureString -String "fCblKbIf+kY10+uB+rROD+wZPT/WxcDNX+EU2O33Q1s=" -AsPlainText -Force New-VBOOffice365ConnectionSettings -AppCredential $Credentials -ApplicationId d052f06e-1cfa-42ff-9636-9da5e7aa1fd1 -ApplicationCertificatePath "C:\ApplicationCertificate.pfx" -ApplicationCertificatePassword $ApplicationCertificatePassword -GrantRolesAndPermissions |