You can choose Basic authentication or Modern authentication (OAuth 2.0) as the authentication method when configuring the Exchange Online data sources.
In the above data sources, you can choose the version (V1 or V2) of Exchange Online PowerShell Module that you would like to use, if you have selected Modern authentication (OAuth 2.0) as the authentication method.
Additionally, in the following data sources, PowerShell module MSOnline is used.
Selecting Basic authentication, UC Analytics would use the following PowerShell cmdlets connecting to Exchange Online.
$cred = Get-Credential $session = New -PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell -liveid / -Credential $cred -Authentication Basic -AllowRedirection Import -PSSession $session Get -Mailbox
|
Selecting Modern authentication (OAuth 2.0), you can choose the version of Exchange Online PowerShell Module (V1 or V2) that is installed on the UC Analytics server and used to connect to Office 365.
If Exchange Online PowerShell Module V1 is chosen, the following PowerShell cmdlets will be used to connect to Exchange Online.
Import -Module (( Get-ChildItem -Path $( $env :LOCALAPPDATA + '\Apps\2.0\') -Filter Microsoft.Exchange.Management.ExoPowershellModule.dll -Recurse ).FullName | Select-Object -Last 1) $cred = Get-Credential $session = New -ExoPSSession -Credential $cred -ConnectionUri https://outlook.office365.com/powershell -liveid / Import -PSSession $session Get -Mailbox
|
Note: You must use the same account that is used as UC Analytics service account (more specifically, Data Engine service account), when installing the Exchange Online PowerShell Module V1.
For more details, please check the deployment guide. Or, you may check the articles below.
If Exchange Online PowerShell Module V2 is chosen, the following PowerShell cmdlets will be used to connect to Exchange Online.
Import -Module (( Get-ChildItem -Path "C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement" -Filter Microsoft.Exchange.Management.ExoPowershellGalleryModule.dll -Recurse ).FullName | Select-Object -Last 1) $cred = Get-Credential $session = New -ExoPSSession -Credential $cred -ConnectionUri https://outlook.office365.com/powershell -liveid / Import -PSSession $session Get -Mailbox
|
For more details, please check the deployment guide. Or, you may check the articles below.
The following collection jobs leverage PowerShell module MSOnline to connect to Office 365.
The connection PowerShell cmdlets are as below.
Import -Module MSOnline Get -Module MSOnline $cred = Get-Credential Connect -MsolService -Verbose -Credential $cred Get -MsolUser -SearchString
|
If you are running a Microsoft national cloud, you must update or add an additional parameter to make the PowerShell cmdlets work. Take the national cloud "Office 365 operated by 21Vianet in China" for example.
For Basic authentication, update -ConnectionUri in the New-PSSession command.
$session = New -PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://partner.outlook.cn/PowerShell -LiveID -Credential $cred -Authentication Basic -AllowRedirection |
For Modern authentication, update -ConnectionUri and also add -AzureADAuthorizationEndpointUri in the New-ExoPSSession command.
$session = New -ExoPSSession -Credential $cred -ConnectionUri https://partner.outlook.cn/PowerShell -LiveID -AzureADAuthorizationEndpointUri https://login.chinacloudapi.cn/common |
For PowerShell module MSOnline, add -AzureEnvironment in the Connect-MsolService command.
Import -Module MSOnline Get -Module MSOnline $cred = Get-Credential Connect -MsolService -Verbose -Credential $cred -AzureEnvironment AzureChinaCloud Get -MsolUser -SearchString
|
For other national clouds, you may find the corresponding -ConnectionUri, -AzureADAuthorizationEndPointUri, -AzureEnvironment parameters in the table below.
Office 365 offering | ConnectionUri parameter value | AzureADAuthorizationEndPointUri parameter value | AzureEnvironment parameter value | (Not related to PowerShell - just for record) Exchange Web Services (EWS) URL |
---|---|---|---|---|
Office 365 | Not used | Not used | Not used | NA |
Office 365 Germany | https://outlook.office.de/PowerShell-LiveID | https://login.microsoftonline.de/common | AzureGermanyCloud | https://outlook.office.de/EWS/Exchange.asmx |
Office 365 GCC High | https://outlook.office365.us/PowerShell-LiveID | https://login.microsoftonline.us/common | USGovernment | https://outlook.office365.us/EWS/Exchange.asmx |
Office 365 DoD | https://webmail.apps.mil/PowerShell-LiveID | https://login.microsoftonline.us/common | ? | ? |
Office 365 operated by 21Vianet in China | https://partner.outlook.cn/PowerShell-LiveID | https://login.chinacloudapi.cn/common | AzureChinaCloud | https://partner.outlook.cn/EWS/Exchange.asmx |
Note: If you are running a Microsoft national cloud, in the UC Analytics web portal, you must configure the connection endpoints in the Target Environment settings.
If there is a proxy configured in your environment, you must add an additional parameter to make the PowerShell cmdlets work, including Basic and Modern authentication (V1/V2). (Not necessary for MSOnline module. More on that later.)
For Basic authentication, add -SessionOption in the New-PSSession command.
$session = New -PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell -liveid / -Credential $cred -Authentication Basic -AllowRedirection -SessionOption (New -PSSessionOption -ProxyAccessType ) |
For Modern authentication, add -PSSessionOptionin the New-ExoPSSession command.
$session = New -ExoPSSession -Credential $cred -ConnectionUri https://outlook.office365.com/powershell -liveid / -PSSessionOption (New -PSSessionOption -ProxyAccessType ) |
Also, you must configure the values of powerShellProxyAccessType in the following sections within the UC.Analytics.Insights.DataEngine.DataCollector.dll.config file under C:\Program Files\Quest\UC Analytics\Data Engine, on all the UC Analytics servers.
The available values for powerShellProxyAccessType are:
See the descriptions for the values of powerShellProxyAccessType at: https://docs.microsoft.com/en-us/dotnet/api/system.management.automation.remoting.proxyaccesstype.
You must restart Data Engine service to make the settings come into effect.
Note: The PowerShell module MSOnline uses the proxy settings for Internet Explorer. No additional parameter is required in the PowerShell cmdlets.
You must ensure that the Internet Explorer proxy settings for the service account are set correctly.
© ALL RIGHTS RESERVED. Feedback Términos de uso Privacidad Cookie Preference Center