SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an application and a SharePoint application which uses windows authentication and are on the same domain. From the application, I am making some managed client OM calls to the SharePoint site.

When I deploy the site to IIS with one of the OOB application pools, the site gives a 401 error on pages where the client OM is used. Creating a new app pool account with a user who has access to the SharePoint site works great - no errors.

Since both of the sites are windows auth and on the same domain, how can I make a request to SharePoint under current user's context instead of the app pool identity?

Any help with this will be greatly appreciated.


share|improve this question
up vote 2 down vote accepted

You'd have to turn on impersonate in the webapp. This way requests done to underlying systems are done using the currently logged in user's identity. This works on local machines only though and is thread specific. To send the current user's identity to other systems, delegation is also required:

ASP.NET Impersonation & Delegation

The Client OM and auth.

Sending credentials in code:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.