Forum Discussion
Andrew Schutzman
Sep 13, 2017Copper Contributor
REST Endpoint "_api/navigation/menustate" not returning custom properties.
Documentation (https://msdn.microsoft.com/en-us/library/office/dn600183.aspx#bk_MenuState) states that "customProperties" should be queried using a comma separated value string.
I have tried every combination I can think of but have not gotten any "Shared" or "Local" custom properties to return. Any ideas?
Here are the custom properties.
And here is the rest result with no "customProperties" query string value. And just "_api/navigation/menustate?mapprovidername=%27GlobalNavigationSwitchableProvider%27"
If I use "&customProperties=%27test1%27" I get this error.
If I remove the single quotes I get this error.
I had the same issue (I used 'image' as the property name and a URL as the value) and seem to have found a (weird) solution:
Through google I somehow found an indexed link on a public site which used the API and the 'customProperties' parameter and when I tried it, it actually returned the XML without errors and the specified customProperties showed up as well.
However I noticed that the property names that were used, all started with '_nav_'.
Once I experimented a bit it turned out that if I used property names starting with either 'nav_' or '_nav_' in both the term store and the query string parameter, I no longer got any errors and the customProperties showed up in the returned XML.
I'm very curious if you experience similar behaviour.
- Jeroen MostertCopper Contributor
I had the same issue (I used 'image' as the property name and a URL as the value) and seem to have found a (weird) solution:
Through google I somehow found an indexed link on a public site which used the API and the 'customProperties' parameter and when I tried it, it actually returned the XML without errors and the specified customProperties showed up as well.
However I noticed that the property names that were used, all started with '_nav_'.
Once I experimented a bit it turned out that if I used property names starting with either 'nav_' or '_nav_' in both the term store and the query string parameter, I no longer got any errors and the customProperties showed up in the returned XML.
I'm very curious if you experience similar behaviour.- Andrew SchutzmanCopper ContributorYour fix worked, thanks!