Skip to content

BlueHippoGithub/IMAP-OAuth-2.0-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IMAP-OAuth-2.0-Example

https://youtu.be/eDTO9W81P-Y

Install-Module AzureAD Install-Module ExchangeOnlineManagement

Connect-AzureAD Connect-ExchangeOnline

$app = Get-AzureADServicePrincipal -SearchString "IMAP OAuth 2.0" New-ServicePrincipal -AppId $app.AppId -ServiceId $app.ObjectId -DisplayName "IMAP OAuth Service Principal"

Add-MailboxPermission -Identity "MAILTOACCESS" -User $app.ObjectId -AccessRights FullAccess

$startDate = Get-Date $endDate = $startDate.AddYears(99)

New-AzureADApplicationPasswordCredential -ObjectId "OBJECTID" -CustomKeyIdentifier "IMAP Secret" -StartDate $startDate -EndDate $endDate

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages