microsoft-graph-toolkit icon indicating copy to clipboard operation
microsoft-graph-toolkit copied to clipboard

Peoplepicker fails without get tenant

Open raleec opened this issue 2 months ago • 2 comments

Describe the bug We currently use components of the @microsft/mgt NPM package. However, it is an old version 2.3.1.
I am upgrading from Angular 12 to Angular 15, which requires me to upgrade several other npm packages.
@microsft/mgt is the only one that is giving a hard time. The peoplepicker should display users. However, the search option is now broken. I am getting a nasty error that is impossible to troubleshoot. "error":{"code":"OrganizationFromTenantGuidNotFound","message":"The tenant for tenant guid 'Tenant-in-Non-commercial-Cloud' does not exist."

To Reproduce Steps to reproduce the behavior:

  1. Deploy application with peoplepicker in a non-commercial cloud
  2. Click on Peoplepicker component
  3. See error

Expected behavior I'd like the people picker to display people from the Graph

Environment (please complete the following information):

  • OS: Windows
  • Browser edge
  • Framework Angular 15
  • Context Web
  • Version Latest
  • Provider unsure

Additional context Add any other context about the problem here.

raleec avatar Apr 25 '24 23:04 raleec

What version of the mgt libraries are you trying to upgrade to, and do you have a minimal reproduction you can share?

gavinbarron avatar May 02 '24 19:05 gavinbarron

What version of the mgt libraries are you trying to upgrade to, and do you have a minimal reproduction you can share?

Attempting to upgrade to the latest version. Working on a minimal reproduction.

raleec avatar May 08 '24 16:05 raleec

Upgrading to the latest version in the 2.x range versions: MGT-PEOPLE-PICKER/2.11.2, MgtMsal2Provider/2.11.2, mgt/2.11.2, graph-js/2.2.1 (featureUsage=6)

url: https://graph.microsoft.us/v1.0/me/people?$search=%22hen%22&$top=10&$filter=personType/class%20eq%20%27Person%27

raleec avatar May 13 '24 19:05 raleec

I found the error, and it wasn't related to this failed call. in short, the fix described here: https://github.com/microsoftgraph/microsoft-graph-toolkit/issues/1471 created a condition where the people picker defaults to person. the existing code required group.

raleec avatar May 14 '24 19:05 raleec