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'm using the editMode parameter to detect and display a simple web part admin UI.

When the admin clicks a particular button, I want to use CSOM to update the web part's properties for the page it is on.

If I use the 'web' object for the app web, it says the relative URL I'm passing to the limited web part manager object is invalid. So, I try to create an SPContext object for the host web (via SPHostUrl). But the first query call (to get the web object) fails with 401 unauthorised.

I've tried giving the app every permission under the sun, with the same result.

Can anyone point me in the right direction?

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.