Exchange Online v2 Powershell Unattended for Scripting

preview_player
Показать описание
Microsoft is deprecating the Exchange Online Basic Auth and that requires you to use Exchange Online Version v2 and you will have a lot of scripts currently running to fetch/modify information in office 365 exchange online.

You can follow instructions in this video to update your script running unattended exchange online scripts.

High Level these are the steps :

# create a self signed certificate
New-SelfSignedCertificate -FriendlyName "Exch Unattended Script" -Subject "Exch Unattended Script" -CertStoreLocation "cert:\CurrentUser\My" -KeySpec KeyExchange

# Export Certificate
$cert = Get-ChildItem -Path Cert:\CurrentUser\My\{put certificate thumbprint}

# Create App Registration and grant admin consent
Grant Exchange.ManageAsApp Right under Office 365 Exchange Online

# Assign Exchange Admin Role to the newly registered App.

# Upload Certificate Public Key to recently created App in Azure.

# Run Command On Prem to find if unattended script works

# Sample Script for task scheduler job to export script.
$rcpt = Get-ExoMailbox -resultsize unlimited | select *
Disconnect-ExchangeOnline -Confirm:$false -InformationAction Ignore -ErrorAction SilentlyContinue
Рекомендации по теме
Комментарии
Автор

I don't have Exchange administrator. All I have listed is Cloud Application Administrator under Roles and administrator. is That a licensing thing? I am a global administrator.

fredflintstone
Автор

can we access multi tenant with this approach?

foodislife
Автор

Can we authenticate using Keepas without certificate and by using credentials? EXO V2

razorbug