Share via


Autodiscover - E-mail address cannot be found

You may come across a user that cannot view free busy information when attemtping to schedule a meeting or they may get the following error when attempting to set their OOF message:

We know Outlook 2007 and later utilizes EWS to retrieve these settings and that Outlook requires Autodiscover to obtain the URL values for EWS. So with that knowledge the first step in troubleshooting this issue is to verify that Autodiscover works for this user. You can generate an Outlook Autodiscover log when you enable Outlook logging (File menu, Options, Advanced, Enable troubleshooting logginging). The resulting olkdisc log is located under the %Temp% directory. Open this file and you will find something similar to the following:

4044 0x13713D85 04/04/12 08:25:56 +++++++++++++++++++++++++++++++
4044 0x13713D85 04/04/12 08:25:56 AUTODISCOVER GET SETTINGS BEGIN
4044 0x13713D85 04/04/12 08:25:56 SMTP=someone@fabrikam.com
4044 0x13713DD4 04/04/12 08:25:57 Attempting URL https://CAS1.fabrikam.com/Autodiscover/Autodiscover.xml found through SCP
4044 0x13713DE3 04/04/12 08:25:57 Autodiscover to https://CAS1.fabrikam.com/Autodiscover/Autodiscover.xml starting
4044 0x13713E02 04/04/12 08:25:57 GetLastError=12175; httpStatus=0.
4044 0x13714304 04/04/12 08:25:58 GetLastError=0; httpStatus=401.
4044 0x13714304 04/04/12 08:25:58 AutoDiscover supported auth schemes:
4044 0x13714304 04/04/12 08:25:58 Negotiate
4044 0x13714304 04/04/12 08:25:58 NTLM
4044 0x13714304 04/04/12 08:25:58 Basic
4044 0x13714304 04/04/12 08:25:58 AutoDiscover attempting Auto-Negotiate with Desktop Credentials.
4044 0x13714304 04/04/12 08:25:58 AutoDiscover USING pcreds->dwAuthScheme:
4044 0x13714313 04/04/12 08:25:58 Negotiate
4044 0x13714333 04/04/12 08:25:58 GetLastError=0; httpStatus=200.
4044 0x13714342 04/04/12 08:25:58 Autodiscover XML Received
4044 ---BEGIN XML---
<?xml version="1.0" encoding="utf-8"?>
<Autodiscover xmlns="https://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
<Response>
<Error Time="08:26:00.0807880" Id="423565919">
<ErrorCode>500</ErrorCode>
<Message>The e-mail address cannot be found.</Message>
<DebugData />
</Error>
</Response>
</Autodiscover>
4044 ----END XML----
4044 0x13714352 04/04/12 08:25:58 Autodiscover to https://FABRIKAM-SRV.fabrikam.com/Autodiscover/Autodiscover.xml Failed (0x800C8203)

Here we can see the email address sent within the request, the URL used by the client and the error returned by the CAS. In this example the error was "The e-mail address cannot be found." We can see earlier in the log the SMTP address used in the Autodiscover request and query Active Directory for the e-mail address. You may also want to know where Outlook pulled that e-mail address for the request. Let's first look at how the Outlook profile is first created and then everything will come together.

Autodiscover is a feature that was introduced in Exchange 2007 to automatically create Outlook profiles and retrieve mailbox settings. When you create a new Outlook profile it starts with the Auto Account Setup tab that displays your email address.

Where does the wizard get this information? Capture a network trace from the client while running the wizard and add a filter for Tcp.Port==389. Within the results you will find a frame similar to the following where you will find the proxyAddresses listed. The wizard pulls the primary SMTP address from the LDAP query and populates it with this value.

 FCN=Fabrikam User,OU=2007,OU=Exchange,OU=Enterprise,DC=fabrikam,DC=com0?..2?0?...<..objectClass1?...)..top..person..organizationalPerson..user0?......cn1?......Fabrikam User0?......sn1?......User0?......givenName1?......Fabrikam0?...a..distinguishedName1?...H.FCN=Fabrikam User,OU=2007,OU=Exchange,OU=Enterprise,DC=fabrikam,DC=com0?......instanceType1?......40?...&..whenCreated1?......20110806105919.0Z0?...&..whenChanged1?......20120401180659.0Z0?......displayName1?......Fabrikam User0?......uSNCreated1?......206930?...J..memberOf1?...:.8CN=Group1,OU=Users,OU=Enterprise,DC=fabrikam,DC=com0?......uSNChanged1?......3977280?......proxyAddresses1?...ý..SMTP:fabrikam@fabrikam.com.$smtp:user@service.fabrikam.com.?...?x500:/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=fabrikam.onmicrosoft.com-55785-FabrikamUser6.1X400:c=US;a= ;p=EXCHORG;o=Exchange;s=User;g=Fabrikam;0?......name1?......Fabrikam User0?...$..objectGUID1?......ʶäÝL¢0L??×hÖÝUc0?...!..userAccountControl1?......660480?......codePage1?......00?......countryCode1?......00?...%..lastLogon1?......1297777722202151170?...&..pwdLastSet1?......1295710195946748000?......primaryGroupID1?......5130?.../..objectSid1?..................?.ÖØõ?Ç<éâ].X...0?...+..accountExpires1?......92233720368547758070?......logonCount1?......440?......sAMAccountName1?......user0?...!..sAMAccountType1?......8053063680?...b..showInAddressBoo

Now that we have the SMTP address for the user we can send the Autodiscover request. The client will attempt to locate the Autodiscover URL via the service connection point (SCP) and if that fails it will attempt to use the DNS, HTTP redirect, or SRV record methods. The Autodiscover request will include the primary SMTP address and look similar to the following:

<?xml version="1.0" encoding="utf-8"?><Autodiscover xmlns="https://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006"><Request><EMailAddress>fabrikam@fabrikam.com</EMailAddress><AcceptableResponseSchema>https://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema></Request></Autodiscover>

What about after the profile is created? Whenever Outlook is launched an Autodiscover request is sent to Exchange to retrieve mailbox settings, and once these settings are retrieved it uses the OOF URL to retrieve the mailbox OOF settings (and
notifies client when it is enabled). Where does the Outlook client obtain the SMTP address for these requests? The primary SMTP address is stored within the Outlook profile settings within the registry under the HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\<YourProfileName>. You need to search underneath this key for 001f6641. Opening this value you will see the primary SMTP address of the user in the syntax SMTP:someone@fabrikam.com.

You can also locate this value by viewing the profile settings with MfcMapi. You can download MfcMapi here. The following steps can be used to locate this profile setting using MfcMapi:

1. Launch MfcMapi

2. Go to the Profile menu and select Show Profiles

3. Double-click on the profile you want to view or modify

4. Double-click on the service with the display name value Microsoft Exchange

5. Select the provider with the e-mail address of the user and no provider display name

6. Locate the property name 0x6641001F to view the primary SMTP address used by Autodiscover

7. Double-click 0x6641001F to modify the value

In this example we can see that when the profile was created the primary SMTP address was fabrikam@fabrikam.com, but in the Autodiscover log the request was for someone@fabrikam.com. Then we checked the profile setting using MfcMapi and sure enough the value was someone@fabrikam.com. Outlook refreshes certain profile settings every 24 hours. Here the primary SMTP address for this user was modified and the original SMTP address was removed. Then when the Autodiscover request was sent to the CAS server the LDAP query for that e-mail address failed. Typically when an SMTP address is modified the original address is not removed and this issue will resolve itself within a day. You can also use MfcMapi to modify this value for immediate relief.