?
Solved

Valid user cannot be resolved

Posted on 2009-12-23
8
Medium Priority
?
227 Views
Last Modified: 2012-05-08
Hi,

I am using below code to resolve the "userName". It works absolutely fine
for 99% users but cannot resolve some of our users. Could anyone please
suggest what could be wrong? I am not sure but it has to do something with
their stored Outlook information?

Set rcp = Application.Session.CreateRecipient(userName)
rcp.Resolve

If NOT rcp.Resolved = True Then
      MsgBox "User " & """" & userName & """ could not be resolved."
End If

Thanks.
0
Comment
Question by:deshaw
  • 3
  • 3
  • 2
8 Comments
 
LVL 23

Assisted Solution

by:rhandels
rhandels earned 400 total points
ID: 26117910
Are the users hidden fgrom teh address list?? If so, you are unable to look them up.. For the record, i'm not a programmer so i have no idea if the code you typed is correct :)

Also, if you are using the mapi client (Outlook i guess?) are you using cached exchange mode? This could also sometimes cause problems with the address list.
0
 
LVL 1

Author Comment

by:deshaw
ID: 26118374
No. Neither of you mentioned is true. But I think the below might be the reason? It happens when I have below type of user name entries. When I try to resolve "foo, user", it doesn't get resolved but "foo, user(dept1)" gets resolved successfully.

foo, user
foo, user(dept1)

Please note that both of above users are different. Do you think any connection with these entries and naming resolution?

Thanks.
0
 
LVL 23

Expert Comment

by:rhandels
ID: 26118421
So you are trying to get 2 different user with those queries? I don't think there will be an issue with naming conventions tbh. What happens if you try to look them up by using Outlook (or any other MAPI client).
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 1

Author Comment

by:deshaw
ID: 26118437
I tried doing it from Outlook look up but I didn't see any difference. For example, when I copy "foo user" in To list, and press Cntl+K, it gives me pop-up for selecting between "foo user" and "foo user(dept1)". The same pop up appears when I do look up for "foo user(dept1)". Not sure where is the issue. I might need to check how resolve query works.

Thanks.
0
 
LVL 23

Expert Comment

by:rhandels
ID: 26121851
It looks like the query to the Excahnge server only uses the user name to check the address list..
0
 
LVL 76

Accepted Solution

by:
David Lee earned 1600 total points
ID: 26131415
Hi, deshaw.

Here's a link to an article that explains how name resolution works: http://www.msexchange.org/articles/Ambiguous-Name-Resolution.html  I'm not aware of any documentation on the underlying mechanisms.  I am also not aware of any programming that can change how name resolution works.  I tend to use email addresses instead of names for the simple fact that addresses are unique while names are not.  If I can't use an address, then my next choice is an account name.  Account names are also unique.  For a name to resolve it has to be unique.  For example, if I resolve "Lee" the process will find all occurrences of "Lee" both as a first and last name.  In your example the GAL must contain entries for "foo user" and "foo user(dept1)".  I expect that the "(dept1)" part is being dropped from the search resulting in "foo user" being searched for and found twice.  

0
 
LVL 1

Author Closing Comment

by:deshaw
ID: 31669721
Thanks.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 26131478
You're welcome.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question