1

Instead of using an app, is there a way to impersonate a user and interact with SharePoint directly?

Essentially, is it possible to create a desktop application that accesses SharePoint on behalf of a user without explicit permission from SharePoint admins?

1

See ClientContext and Office 365 how to use SharePointOnlineCredentials

3
  • Any idea what needs to be installed for Microsoft.SharePoint.Client.Runtime reference? I am able to add the reference in VS, but the using statement does not recognise it.
    – Akash
    Aug 22 '13 at 9:55
  • If you install SharePoint Server 2013 Client Components SDK the Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll will be at C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI Aug 22 '13 at 10:09
  • Interesting.. I have the dll there as well, and I can add the reference as well. However, the using statement gives a build error(and, intellisense does not work for it either ). Looks more like a VS issue I guess
    – Akash
    Aug 22 '13 at 11:32
0

Yes. You can use a browser or any other app under any context you choose, provided you have the credentials:

From the command line:

runas /user:Domain\User "C:\Program Files\Internet Explorer\iexplore.exe"

You'll get challenged for the pasword before the app starts but from then on, you're running under a different user name and context from the desktop login account. You can substitute the browser path for any application such PowerShell or SharePoint Designer, which I normally need to do on production systems to have workflows and the like run under different security accounts, etc.

1
  • I'm planning to write the app, so was looking for help on how to pass the credentials to SharePoint in such a case
    – Akash
    Aug 22 '13 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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