Description
What type of issue is this?
other
What SharePoint development model, framework, SDK or API is this about?
SharePoint CSOM
Target SharePoint environment
SharePoint Online
What browser(s) / client(s) have you tested
- 💥 Internet Explorer
- 💥 Microsoft Edge
- 💥 Google Chrome
- 💥 FireFox
- 💥 Safari
- mobile (iOS/iPadOS)
- mobile (Android)
- not applicable
- other (enter in the "Additional environment details" area below)
Additional environment details
My application is an C# Web Api (.NET 8) which serves as a middleware between my system and SharePointOnline. The application will be integrating with SharePointOnline by using SharePoint CSOM library (Microsoft.SharePointOnline.CSOM v16.1.21213.12000) from Nuget.
Issue description
Hi. I have a SharePointOnline list composed of 2 columns as below.
- Title (Text type)
- AssetManager (People type)
I have 3 users created in Microsoft Entra ID as below:-
a) User#1
- Principal name: ******@myspotest.onmicrosoft.com
- Display name: John, Doe
- Status: Active & Enabled (MS Entra ID)
b) User#2
- Principal name: ******@myspotest.onmicrosoft.com
- Display name: John, Humming
- Status: Active & Enabled (MS Entra ID)
c) User#3
- Principal name: ******@myspotest.onmicrosoft.com
- Display name: John, Tim
- Status: Active & Enabled (MS Entra ID)
My application is using
to create item(s) to the SharePoint list. I have uploaded the sample code extracted from my application to GitHub, also available in the attachment section. I am using Microsoft.SharePoint.Client.FieldUserValue.FromUser(@DisplayName) to lookup people by DisplayName to populate the AssetManager column (People type). All the 3 users are active but the lookup works for user#1 but not for user#2 & user#3. I received the following errors when lookup for User#2 & User#3.
#User#2
- Error ServerErrorCode = -2130575276
- ServerErrorTraceCorrelationId = "f76070a1-b0da-7000-73f7-37734443b28b"
- ServerErrorTypeName = "Microsoft.SharePoint.SPException"
- Message = Message = "The user does not exist or is not unique."
- Source = Source = "Microsoft.SharePoint.Client.Runtime"
#User#3
- Error ServerErrorCode = -2130575276
- ServerErrorTraceCorrelationId = "206170a1-608d-7000-2916-c89268d414be"
- ServerErrorTypeName = "Microsoft.SharePoint.SPException"
- Message = Message = "The user does not exist or is not unique."
- Source = Source = "Microsoft.SharePoint.Client.Runtime"
Could you please advise why the lookup failed? Do let me know if you need more info. Thanks.