-
Start
-
Exchange Server
-
- Artikel in Kürze
-
- Artikel in Kürze
-
Exchange Hybrid
-
- Artikel in Kürze
-
- Artikel in Kürze
-
- Artikel in Kürze
-
Exchange Online
-
- Artikel in Kürze
-
- Artikel in Kürze
-
- Artikel in Kürze
-
AutoDiscover v2 per PowerShell gegen Exchange Online und Exchange Server testen
Dieser Artikel zeigt dir, wie du den AutoDiscover v2 JSON-Endpunkt für Exchange Online (EXO) und Exchange Server (On-Premises) ganz bequem mit PowerShell testen kannst. Autodiscover v2 liefert die Service-Endpunkte für Protokolle wie EWS, ActiveSync oder REST im JSON-Format.
AutoDiscover v2 ist eine anonyme HTTP-Get-Anfrage auf Basis einer SMTP-Adresse ohne Authentifizierung. Die Antworten enthalten keine Postfachdaten oder persönliche Informationen, sondern nur die Endpunkt-URI für das angefragte Protokoll.
Typische Anwendungsfälle für eine manuelle AutoDiscover v2-Anfrage per PowerShell sind:
- Validierung der korrekten Konfiguration von AutoDiscover in Hybrid-Umgebungen
- Troubleshooting bei Client-Verbindungsproblemen
- Prüfung der Namensauflösung und Zertifikatskonfiguration
AutoDiscover-Endpunkte
Je nach Zielumgebung musst du eine andere Endpunktadresse verwenden:
- Exchange Online
https://outlook.office365.com/autodiscover/autodiscover.json - Exchange Server
https://autodiscover.<deinedomain.tld>/autodiscover/autodiscover.json
Die AutoDiscover-Antwort enthält die Endpunkt-URL für das Postfach der E-Mail-Adresse für angefragte Protokoll.
Eine Antwort liefert der AutoDiscover-Endpunkt nur dann, wenn:
- Die DNS-Namensauflösung für den Endpunkt funktioniert
- Die HTTPS-Strecke von dem ausführenden System zur Endpunkt-URL funktioniert
- Ein Postfachobjekt für die angefragt E-Mail-Adresse vorhanden ist
Die in der AutoDiscover-Antwort angegebene Endpunkt-Adresse zeigt in einem Hybrid-Szenario automatisch an, ob ein Postfach in Exchange Online oder On-Premises gehostet wird.
- Exchange Online AutoDiscover
- EXO-Postfach: Endpunkt-URL ist Office 365
- On-Premises-Postfach: Endpunkt-URL ist aus dem On-Premises-Namensraum, auf Basis der IntraOrganizationConnector-Information in Exchange Online
- Exchange Server AutoDiscover
- EXO-Postfach: Endpunkt-URL ist Office 365
- On-Premises-Postfach: Endpunkt-URL ist aus dem On-Premises-Namensraum, auf Basis der URL-Konfiguration der virtuellen Verzeichnisse
Beispiel für Exchange Online
# EWS-Endpunkt für eine EXO-Mailbox ermitteln
$resp = Invoke-RestMethod -Uri "https://outlook.office365.com/autodiscover/autodiscover.json?Email=user@deinedomain.tld&Protocol=EWS"
$resp
# REST-Endpunkt für eine EXO-Mailbox ermitteln
$rest = Invoke-RestMethod -Uri "https://outlook.office365.com/autodiscover/autodiscover.json?user@deinedomain.tld&Protocol=Rest"
$rest
# Beispielausgabe
{ "Protocol":"EWS", "Url":"https://outlook.office365.com/EWS/Exchange.asmx" }
Beispiel für Exchange Server
Im folgenden Beispiel besteht der Exchange-Namensraum aus den beiden Adressen
- autodiscover.varunagroup.de
- mail.varunagroup.de
# EWS-Endpunkt für eine EXO-Mailbox ermitteln
$resp = Invoke-RestMethod -Uri "https://autodiscover.varunagroup.de/autodiscover/autodiscover.json?Email=jdoe@varunagroup.de&Protocol=EWS"
$resp
# REST-Endpunkt ermitteln
$rest = Invoke-RestMethod -Uri "https://autodiscover.varunagroup.de/autodiscover/autodiscover.json?Email=jdoe@varunagroup.de&Protocol=Rest"
$rest
# Beispielausgabe
{ "Protocol":"EWS", "Url":"https://mail.varunagoup.de/EWS/Exchange.asmx" }