In a recent CSOM update by Microsoft (see here), the AudienceIds property of the NavigationNode has been made public

I've been trying to set an Audience for the node using Powershell but so far no luck.

First problem is that property requires a list of Guids and users/groups don't have guids, just integer ids. There's associated guids for them in the User Information List, and i've been trying to set them as so

$r = New-Object "System.Collections.Generic.List[Guid]"
$guid  = [Guid]"366d271a-4cc1-40e1-8449-c2f7b622b245"
$node = Get-PnPNavigationNode -Id 2066

$node.AudienceIds = $r

This apparently fails quietly, as no error is given, and no audience is applied.

Has anyone gotten anything done using this property?

Your Answer

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

Browse other questions tagged or ask your own question.