====== Authentication via OAuth 2.0. with Office 365 ====== ===== eBiss Host ===== For SMTP the host should be *.mail.protection.outlook.com on port 25, .e.g.: * .mail.protection.outlook.com on port 25 to get it to work The information is from: https://learn.microsoft.com/en-us/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide ===== Azure configuration ===== On Micosoft Azure, you need to enter a new registration under App Registrations. On this you will then find the: - Application ID (client) - Tenant ID = Directory ID (client) and - the Client Secret under Certificates & Secrets The registered app must then be enabled for access via POP3 and SMTP via "API Permissions". Under Add Permission and then the tab "APIs used by my organization" there select "Office 365 Exchange Online". then "Application permissions" and there you will find POP and SMTP. After that you have to do the following in the power shell: Install-Module -Name ExchangeOnlineManagement Install-Module -Name AzureAD Install-Module Microsoft.Graph Connect-AzureAD -TenantID Connect-ExchangeOnline -Organization # prüfen Get-AzureADServicePrincipal -SearchString "" $MyApp = Get-AzureADServicePrincipal -SearchString "" New-ServicePrincipal -AppId $MyApp.AppId -ServiceID $MyApp.ObjectID -Display "Sercie Principal for POP3 App" Add-MailboxPermission -Identity "" -User $MyApp.ObjectId -AccessRights FullAccess