0

In a desktop application I want to get the current user's email address to use Exchange Web Services auto discovery mechanism as here:

var svc = new ExchangeService()
                      {
                          UseDefaultCredentials = true
                      };
            svc.AutodiscoverUrl("user@company.com");

I know the current users domain\username; how do I get the email address before configuring EWS?

aateeque
  • 2,161
  • 5
  • 23
  • 35

1 Answers1

0

You need to use something other then EWS to get that eg LDAP is generally the most common method eg see something like Get UPN or email for logged in user in a .NET web application

Cheers Glen

Community
  • 1
  • 1
Glen Scales
  • 20,495
  • 1
  • 20
  • 23