Adds a role group with the ApplicationImpersonation role configured and assigns it to the specified account.
Enable-M365ApplicationImpersonation [-ShowPrereqs] [<CommonParameters>]
Enable-M365ApplicationImpersonation -ConfigNode <String> -ImpersonationAccount <String>
[-RoleGroupName <String>] [<CommonParameters>]
Use the Enable-M365ApplicationImpersonation
cmdlet to add a new role group with the ApplicationImpersonation role configured and assign it to the specified account. If organization settings are currently dehydrated, they will first be hydrated to allow the operation to succeed.
# config.psd1
@{}
Enable-M365ApplicationImpersonation -ImpersonationAccount 'admin@example.org'
Creates a new role group named Impersonation
(default) and assigns it to the admin@example.org
account. This example uses Basic authentication.
# config.psd1
@{
Target = @{
M365UseModernAuth = $true
}
}
Enable-M365ApplicationImpersonation -ImpersonationAccount 'admin@example.org' -RoleGroupName 'Mailbox Migration'
Creates a new role group named Mailbox Migration
and assigns it to the admin@example.org
account. This example uses Modern authentication.
Type: String
Parameter Sets: Action
Aliases:
Accepted values: Source, Target
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The account to assign to the new role group. This should be an admin account for which you want ApplicationImpersonation privileges.
Type: String
Parameter Sets: Action
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The name to use for the new role group. If not specified, Impersonation
is used.
Type: String
Parameter Sets: Action
Aliases:
Required: False
Position: Named
Default value: Impersonation
Accept pipeline input: False
Accept wildcard characters: False
Prints the cmdlet prerequisites.
Type: SwitchParameter
Parameter Sets: Help
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
The ExchangeOnlineManagement module must be installed. You can install it by running Install-Module ExchangeOnlineManagement -Scope CurrentUser
.
A TMCTools license is not required to use this cmdlet.