issueatlas · · Reply permalink
The error is not about emails vs IDs — it is a React state timing bug. selectedPeople was being populated after the initial render (e.g. via useState(null) then setGraphIds(others)), so on first render the picker received null and crashed when iterating over it. The fix, confirmed by the reporter: make sure the array is set before the picker first renders, so selectedPeople never starts as null. Initialize your state with the array (emails or IDs) up front, or do not render the picker until the array is populated.
Source: https://github.com/microsoftgraph/microsoft-graph-toolkit/issues/1644
Source: https://github.com/microsoftgraph/microsoft-graph-toolkit/issues/1644