Forum Discussion

mmahadikar's avatar
mmahadikar
Copper Contributor
Sep 12, 2022

Support for Unattended scripting in delegation scenarios for Exchange Online Powershell EXOV2 module

Currently we use EXO V1 module for unattended scripting in delegation scenarios.

We use refresh tokens to create a session via the following commands -

 

 

$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://outlook.office365.com/powershell-liveid?BasicAuthToOAuthConversion=true" -Credential $credential -Authentication Basic -AllowRedirection

 

 

The refresh token is obtained by making a POST call to https://login.microsoftonline.com/[azure_tenant_id]/oauth2/v2.0/token with clientID and clientSecret.

Since the support for EXO V1 with basic Authentication will be deprecated starting October 2022, we want to move to EXO V2 module. We went through the documentation of EXO V2 module and did not find anyway how unattended scripting in delegation scenarios are supported.

Could you help us how we could use unattended scripting in delegation scenarios for Exchange Online Powershell EXO V2 module?

5 Replies

Resources