Tag Info

New answers tagged


I've managed to accomplish this by doing the following. Once I've added my permissions to a folder or a file I do a clear up. I remove the role Full Control from the admin account. When I go to remove the admin from the users site, the admin account no longer appears and no files are shared with the admin which is what I wanted.


You can't quite impersonate over REST API since the code runs client-side and any user could capture the request and use it maliciously to impersonate the user for other operations. If you have a High-Trust (Provider Hosted) App SharePoint trusts who your signed token claims the user is, but even then, you shouldn't use it client side. You might try using ...


Using Win32 API: This is not a SharePoint solution, so SharePoint is not fully "aware" of the impersonation. The code will indeed run under the new identity, but first thing, you'll need to create (and later destroy) new SPSite and SPWeb objects, as these objects retain the identity of the user who created them (and contextual SPSite and SPWeb were created ...

Top 50 recent answers are included