2
why no access to autodiscover.xml
Question asked by Stefan - 7/20/2021 at 7:31 AM
Answered
Hello,

i'm just investigating if smartermail will fulfill our needs and would like to test a bit

actual Problem: if i access https ://autodiscover.mydomain.tld/autodiscover/autodiscover.xml i get prompted with an basic-auth-dialog
i tried with domain-account and tried with smartermail-account, it keeps asking me for username and password :(

what i've done:
install fresh windows server 2019 in hyper-v
install all updates
set static ip
install ad-services
promote as single domain-server with dns running locally
installed smartermail (so smartermail installed iis)
added domain in smartermail, activated MAPI
added domain-user in AD and in SM
followed instructions on https ://portal.smartertools.com/kb/a2752/set-up-autodiscover-for-smartermail.aspx except rewrite-rule
(including trusted certificate, i can open https ://autodiscover.mydomain.tld/ without errors)

what could be the cause?

6 Replies

Reply to Thread
0
Zach Sylvester Replied
Employee Post
Hello, 

Thank you for reaching out to the community. The reason that this doesn't work is that your browser isn't passing in the proper headers. So this is expected behavior. Please let me know if this helps. 

Best Regards, 
Zach Sylvester System/Network Administrator SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
Tony Scholz Replied
Employee Post
Hello Stefan, 

If you would like to see what XML response is returned there are 2 ways to get this. The first is from SmarterMails web interface. 

Go to the Domain you want to see this for ( Manage -> Domain -> {domain} -> Configuration [tab] ) ONce there go to the autodiscover card and select override desktop/mobile XML then the edit icon. In the popup press the generate button to see the defaul AutoDiscover XML


The next option is to make a POST call passing the proper parameters to the URL to get the details. Here is a cURL example. You will need to adjust the highlighted field and provide the xml_post txt file with the XML details for the desktop request. 

cURL -ki --basic -u USERNAME:PASSWORD \
	-H "Content-Type: text/xml" \
	-d @xml_post \
	--url https://DOMAIN/autodiscover/autodiscover.xml
Thank you
Tony Scholz System/Network Administrator SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
Stefan Replied
Hell Zach, hello Tony,

thanks for your replies. Unfortunately it still won't work with Outlook

@Zach: That would be ok, viewing the contents in Browser would be just for me to see if it basicly works (to verify step by step)
@Tony: As written, I'm not really interested in the content right now, but it should help investigating.
FYI:
with correct user/password:
cURL -ki --basic test@domain.de:SomePass123# -H "Content-Type: text/html" -d @xml_post --url https: //autodiscover.domain.de/autodiscover/autodiscover.xml
Warning: Couldn't read data from file "xml_post", this makes an empty POST.
curl: (3) Port number ended with 'B'
HTTP/1.1 401 Unauthorized
Cache-Control: private
Content-Type: text/html
Content-Security-Policy: frame-ancestors 'self'
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
request-id: 2ca67484-2465-434a-b3a0-b4b7fc9fdb4f
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
WWW-Authenticate: Basic realm="autodiscover.domain.de"
X-FEServer: SMARTERMAIL
Date: Thu, 22 Jul 2021 14:04:31 GMT
Content-Length: 0
the output is always the same with:
- correct DomainUser / Password
- correct smartermail-adminUser/Password
- incorrect user/pass

BUT:
I thought ok, if this is maybe an expected behaviour, i will test with outlook
so i testet to connect with outlook 2016 and 2019, in both cases i just enter name, mail, password
outlook finishes setup fast (so it seems to find the settings after system-modal-prompt)
but in both cases outlook cant start.

German Error-Message:
---------------------------
Microsoft Outlook
---------------------------
Microsoft Outlook kann nicht gestartet werden. Das Outlook-Fenster kann nicht geöffnet werden. Diese Ordnergruppe kann nicht geöffnet werden. Bevor Sie Ihre Ordner mit Ihrer Outlook-Datendatei (.ost) synchronisieren können, müssen Sie eine Verbindung mit Microsoft Exchange mit Ihrem aktuellen Profil herstellen.
---------------------------
OK  
---------------------------

if i start Outlook again i'm prompted to enter password für test@domain.de via system-modal, but entering correct or wrong password doesn't make any difference, also saving credentials will show up the modal again.
if i cancel the modal i get the same error-message as above


what i may have missed? (used current Build 7866)
1
Tony Scholz Replied
Employee Post Marked As Answer
Hello Stefan, 

For the cURL command, I am seeing this error

Warning: Couldn't read data from file "xml_post", this makes an empty POST.

You will need to create a file with the XML data in it with the correct email address

<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006">;
	<Request>
		<EMailAddress> USER@DOMAIN.TLD </EMailAddress>
		<AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema>;
	</Request>
</Autodiscover>
The file will be defined here

cURL -ki --basic -u USERNAME:PASSWORD \
	-H "Content-Type: text/xml" \
	-d @xml_post.txt \
	--url https://DOMAIN/autodiscover/autodiscover.xml
As for the failure in Outlook to start after it completes. Can you try running in safe mode to see if this resolves the issue? You can also check for corrupt PST files. 

If this does not work you may need to open a support ticket so that we can test locally. 

Thank you
Tony Scholz System/Network Administrator SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
Stefan Replied
Hey Tony,

yesterday i made one mistake: i did not deactivate the second network-adapter, that has acces to the real network, so outlook tried to connect to our real domain-server. that should be the cause of the repeatingly showing login-promt.

now i deactivated the second network, deleted the outlook profile in system control, looked for any remaining files in %appdata% and deleted them, start outlook, try to connect. But Outlook is still unable to start after login-prompt
outlook /safe makes no difference
also there are no *.pst-files in %appdata%
also tried the user i'm currently logged on, but same

i will open a support-ticket, thanks so far

PS: also testet curl again with your xml and modified mail-adress, but its still 401
0
Stefan Replied
looks like it was a problem with connectivity, outlook seems to require internet-connection, works now, i will continue testing, thanks!

Reply to Thread