How to get values from mgt-people-picker

Steele, Lawrence P 16 Reputation points
2021-01-11T22:57:09.03+00:00

I'm using the Microsoft Graph People Picker component (https://learn.microsoft.com/en-us/graph/toolkit/components/people-picker) and it's working great.

This one html tag queries Azure AD and allows me to select a person from the list:
<mgt-people-picker type="person" id="peoplePicker" selection-mode="single"></mgt-people-picker>

The problem I'm having is figuring out the syntax for reading the values for the person selected. I found a number of posts related to SharePoint or InfoPath but none for MS Graph Toolkit.

Since reading the selected values is a core function of the component, I know there are references out there, despite my failure to find them. I'd appreciate if someone could provide a couple of links on how to read the values for the selected person.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
42,167 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Steele, Lawrence P 16 Reputation points
    2021-01-12T02:19:08.877+00:00

    I finally found the hint I was looking for.

    This video provided some syntax on how to work with component values: https://www.youtube.com/watch?v=TbAZHvB5NEk&ab_channel=Microsoft365PnPCommunity. Most importantly, I learned that I needed to wrap my output in a template tag.

    Adding template to my search led me to this page: https://quares.ru/?id=256232. If you're like me and can't read Cyrillic, this link should help: https://translate.google.com/translate?hl=en&sl=ru&u=https://quares.ru/%3Fid%3D256232&prev=search&pto=aue.

    Hopefully this will help anyone else who's struggling to read the values from the People Picker selected person.

    2 people found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.