How to show "Role" of People Webpart

%3CLINGO-SUB%20id%3D%22lingo-sub-1324435%22%20slang%3D%22en-US%22%3EHow%20to%20show%20%22Role%22%20of%20People%20Webpart%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1324435%22%20slang%3D%22en-US%22%3E%3CP%3EHey%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20try%20to%20create%20and%20maintain%20a%20People%20Webpart%20on%20a%20Modern%20Page%20using%20PowerShell.%3C%2FP%3E%3CP%3EThis%20works%20so%20far.%20I%20set%20the%20properties%20with%20the%20following%20command%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24properties%3D%20'%7B%22layout%22%3A1%2C%20%22persons%22%3A%5B%7B%22id%22%3A%20%22test1%40test.dev%22%2C%20%22role%22%3A%20%22Director%22%7D%2C%7B%22id%22%3A%20%22test2%40test.dev%22%2C%20%22role%22%3A%20%22Manager%22%7D%5D%7D'%0A%0ASet-PnPClientSideWebPart%20-Page%20Home%20-Identity%200154f2f1-02a3-489a-bad1-ae78f6en7765%20-PropertiesJson%20%24properties%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20sets%20the%20property%20correctly.%20I%20see%20this%20both%20in%20the%20PowerShell%20and%20when%20I%20call%20up%20the%20page%20briefly.%3C%2FP%3E%3CP%3EAs%20soon%20as%20the%20page%20has%20finished%20loading%2C%20my%20description%20is%20no%20longer%20visible.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20use%20the%20compact%20view%20of%20the%20webpart.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20can%20I%20display%20the%20role%20permanently%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20a%20lot!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1324435%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESites%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EUsage%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Occasional Contributor

Hey,

 

I try to create and maintain a People Webpart on a Modern Page using PowerShell.

This works so far. I set the properties with the following command:

 

$properties= '{"layout":1, "persons":[{"id": "test1@test.dev", "role": "Director"},{"id": "test2@test.dev", "role": "Manager"}]}'

Set-PnPClientSideWebPart -Page Home -Identity 0154f2f1-02a3-489a-bad1-ae78f6en7765 -PropertiesJson $properties

 

It sets the property correctly. I see this both in the PowerShell and when I call up the page briefly.

As soon as the page has finished loading, my description is no longer visible.

 

I use the compact view of the webpart.

 

How can I display the role permanently?

 

Thanks a lot!

 

 

0 Replies