msgraph-sdk-dotnet icon indicating copy to clipboard operation
msgraph-sdk-dotnet copied to clipboard

Creating a one-on-one chat using user principal name fails with error Failed to find users with user principal name

Open ReniKIcon17 opened this issue 3 years ago • 0 comments

Expected behavior

Create a one-on-one chat when giving userprincipalname as mentioned in documentation Microsoft Graph documentation for chat creation with userprincipalname you used to determine the expected behavior.

Actual behavior

Errors out as Service exception. Details: {"Code: NotFound\r\nMessage: Failed to find users with user principal name ''\r\nInner error:\r\n\tAdditionalData:\r\n\tdate: 2022-08-10T15:05:48\r\n\trequest-id: b0413fef-b33a-4e9c-b9fa-25f7055b5784\r\n\tclient-request-id: b0413fef-b33a-4e9c-b9fa-25f7055b5784\r\nClientRequestId: b0413fef-b33a-4e9c-b9fa-25f7055b5784\r\n"}

Steps to reproduce the behavior

Try to create a chat with a user's principal name (instead of their uuid) as mentioned in the documentation. It will error out.

Note: The calls with uuid work, and I am currently using the graph sdk to obtain the users uuid with the userprincipalname and then calling the graph sdk to create a chat with the uuid. I would like to directly use the userprincipalname instead as you have mentioned in the help docs.

ReniKIcon17 avatar Aug 10 '22 15:08 ReniKIcon17