The issue is related to .NET Core with CSOM.
In .NET Core the authentication for SharePoint Online changed and it’s no longer supporting the “SharePointOnlineCredentials” class.
I followed the official documentation successfully : https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/using-csom-for-dotnet-standard
This code runs in Azure function V3, and the API is triggered by a user button click in the SharePointOnline UI. This API creates a new SP item.
However, in the previous versions I could update the sharepoint item “Modified by” system field easily with a new User object.
In this version since the authentication changed, each ExceuteQuery action, the access token for the admin user is requested, and the “Modified by” field is the admin and not the User as I defined in my code.
I wish the current user will be defined as the item creator/editor. and not the user defined for the access token.
Please assist how can I perfom this action.
Thanks,