401 Error When trying to connection to exchange with EWS RRS feed

  • Question

  • I can connect to exchange just fine using Default Credentials (.UseDefaultCredentials = true) but as soon as i try to specify the credentials and set Default credentials = false i get a HTTP 401 Error. Say my NT user account is just "User" i have tried all of following:

    exchange.Credentials = New NetworkCredential("User", "MyPassword", "MyDomain")

    exchange.Credentials = New NetworkCredential("MyDomain\User", "MyPassword")

    exchange.Credentials = New NetworkCredential("", "MyPassword")

    I've also tried all the above with WebCredential instead of NetworkCredential and it still fails with a 401 error

    Little background:
    We have two mailboxes our exchange admins have setup for us call it TestMailbox & ProdMailBox. Everyone in our group can read these mailboxes just fine and add them to outlook by just going under the exchange server advanced tab & adding them to "Open these additional mailboxes:" (No addtional username/password is needed)

    These are the mailboxes we need to read. Not the credentials the user is logged in under. I first tried to to just use .AutoDiscoverUrl("") unfortunately this connected to my local mailbox which is not what i need of course so then i tried to change my credentials like above and it failed every time. Then since i knew using DefaultCredentials i was able to get it to work for my own account to get it to work by setting default credentials to false and specifying the credentials like above to see it would work and it won't.

    I've been using the following link as the basis of what ive tried:

    My last attempt is to have the admin try to turn impersonation on and maybe i cause use default credentials and just impersonate the TestMailbox/ProdMailbox accounts according to this link:

    but it looks like you still have to provide credentials for the account your trying to impersonate which failed previously.


    Wednesday, April 11, 2012 3:35 PM


  • We figured it out. TheTestMailbox & ProdMailbox domain accounts were both setup to only allow certain computer to login locally.
    • Marked as answer by Choclabs74 Wednesday, April 11, 2012 4:39 PM
    Wednesday, April 11, 2012 4:38 PM