# Mail mit oAuth2 und Microsoft Business / Exchange Online

**URL:** <https://forum.shopware.com/t/mail-mit-oauth2-und-microsoft-business-exchange-online/108180>\
**Category:** Administration\
**Created:** [6. November 2025 um 15:49 UTC](https://forum.shopware.com/t/mail-mit-oauth2-und-microsoft-business-exchange-online/108180 "2025-11-06T15:49:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kannenmay](https://avatars.discourse-cdn.com/v4/letter/k/82dd89/32.png) [@kannenmay](https://forum.shopware.com/u/kannenmay)\
**Post date:** [6. November 2025 um 15:49 UTC](https://forum.shopware.com/t/mail-mit-oauth2-und-microsoft-business-exchange-online/108180/1 "2025-11-06T15:49:17Z")

</div>

Hallo Zusammen  
Ich versuche im Shopware Mailer eine Mailadresse aus meinem Microsoft Tenant als Versandadresse einzurichten und bin auf der Fehlersuche auf diesen Foreneintrag gestossen:

> [@Mailer mit Oauth2 Anbindung](https://forum.shopware.com/t/mailer-mit-oauth2-anbindung/106719):
>
> Wir haben Shopware 6.6.10.2 installiert um am Mailer Oauth2 zu nutzen. Leider bekommen wir einen Fehler beim Mailversand und denken dass es am der OAuth URL liegt. Kann uns jemand helfen, was an der Redirect\_URI rein muss? https ://login.microsoftonline.com/%7Btenant%7D/v2.0/adminconsent?client\_id=\<CLIENT\_ID\>&redirect\_uri=\<REDIRECT\_URI\>&scope=https ://outlook.office365.com/.default Tenant und Client\_ID haben wir aus Entra, eine Web registrierung für die Redirect URI auch, allerdings ist auch…

Gemäss diversen Rückmeldung funktioniert die Anleitung von halb7 (übrigens vielen Dank, das ist eine sehr übersichtliche und detaillierte Anleitung ohne Schnickschnack). Bei mir klappt es aber nur bis zum Punkt 5: Connect-AzureAD.

Da erhalte ich immer den Fehler:

 ![grafik](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/5/2/520ba811e0adb1f38d8cfb8a3a42e4238d7f7181.png)

Hat jemand eine Idee oder kann mir jemand sagen, was zu tun ist?

---

<div class="post-metadata">

**Author:** ![SCOOPEX](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/scoopex/32/18328_2.png) [@SCOOPEX](https://forum.shopware.com/u/SCOOPEX)\
**Post date:** [6. November 2025 um 16:42 UTC](https://forum.shopware.com/t/mail-mit-oauth2-und-microsoft-business-exchange-online/108180/2 "2025-11-06T16:42:27Z")

</div>

Hallo,

hast Du vorher folgende Befehle ausgeführt ?

```auto
Install-Module AzureAD
Import-Module AzureAD

```

---

<div class="post-metadata">

**Author:** ![kannenmay](https://avatars.discourse-cdn.com/v4/letter/k/82dd89/32.png) [@kannenmay](https://forum.shopware.com/u/kannenmay)\
**Post date:** [6. November 2025 um 20:37 UTC](https://forum.shopware.com/t/mail-mit-oauth2-und-microsoft-business-exchange-online/108180/3 "2025-11-06T20:37:35Z")

</div>

> [@SCOOPEX](#):
>
> `Import-Module AzureAD`

Danke für die Antwort. Das Problem war, dass der PC auf welchem ich das ausgeführt habe einen Snapdragon CPU hat. Auf einem i5 hats nun genau nach Anleitung funktioniert. Allerdings erhalte ich immer noch den Fehler:  
{  
„error“: „Failed to authenticate on SMTP server with username „info@…com“ using the following authenticators: „XOAUTH2“. Authenticator „XOAUTH2“ returned „Expected response code „235“ but got code „535“, with message „535 5.7.3 Authentication unsuccessful [ZR2P278CA0068.CHEP278.PROD.OUTLOOK.COM 2025-11-06T20:16:42.051Z 08DE1CD0D879DE96]“.“.“,

Ich habe alles mehrfach überprüft… Das ist irgendwie frustrierend.

---

<div class="post-metadata">

**Author:** ![SCOOPEX](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/scoopex/32/18328_2.png) [@SCOOPEX](https://forum.shopware.com/u/SCOOPEX)\
**Post date:** [6. November 2025 um 21:04 UTC](https://forum.shopware.com/t/mail-mit-oauth2-und-microsoft-business-exchange-online/108180/4 "2025-11-06T21:04:25Z")

</div>

SMTP ist aber aktiviert, 2FA deaktiviert für den Benutzer und dieser hat eine gültige Lizenz ?

**Microsoft 365 Admin Center → Benutzer → Aktive Benutzer → Benutzer auswählen → Mail → email apps**.

Dort kontrollieren, ob authentifiziertes SMTP aktiviert ist.

Ansonsten schau auch mal hier:

> **[Enable or disable SMTP AUTH in Exchange Online](https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client-smtp-submission#disable-smtp-auth-in-your-organization)**
>
> Summary: An overview of SMTP AUTH in Exchange Online.

Eine weitere mögliche Ursache können auch die Security Defaults in Entra sein:

> **[Konfigurieren von Sicherheitsstandardeinstellungen für Microsoft Entra-ID -...](https://learn.microsoft.com/de-de/entra/fundamentals/security-defaults)**
>
> Aktivieren Sie die Microsoft Entra ID-Sicherheitseinstellungen, um die Sicherheitslage Ihrer Organisation mit vorkonfigurierten MFA-Anforderungen und Legacy-Authentifizierungsschutz zu stärken.
