How to get Web Part Zone Id via CSOM? WebPart has property ZoneIndex but no ZoneId while WebPartDefinition has method MoveWebPartTo(string zoneID, int zoneIndex) but lacks methods to retrieve the ZoneId.
server-side API has WebPart.ZoneID.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
For those just finding this now, the current version (16.1) of the Microsoft SharePoint Online client object model now includes this property on the
Note that this doesn't yet work on-prem, as the server side components don't yet expose this property.
I show you an example how to recognize Web Part Zone Id.
So if we have a page layout like this:
Then we will have a page like this:
That is how the DOM looks like:
What I suppose is that the MSOZoneCell_ is a standard prefix then after that is the Zone Id. So you can use that on your method to move your web part around.
The REST API url needs to have the site url with full
And then need the
personalizationscope when getting webparts :
0 = Shared 1 = User