It has been removed. You shouldn't be using username/pass to access services via API. See https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/using-csom-for-dotnet-standard#using-modern-authentication-with-csom-for-net-standard for more information.
.NET Core SharePointOnlineCredentials class
I'm using the latest CSOM library which should be supported .NET Core solution.
However, I can't find SharePointOnlineCredentials class when coding.
What's the required step to use it in .NET Core solution ?
Thanks for any help please :)
3 answers
Sort by: Most helpful
-
-
Baker Kong-MSFT 3,791 Reputation points
2020-08-04T06:22:44.513+00:00 Hi developersp1-9584,
It's not possible to use SharePointOnlineCredentials in CSOM for .NET Standard. Instead, it's recommended to use OAuth to acquire an access token.
Here is a blog that demonstrates how to use OAuth 2.0 Resource Owner Password Credentials for fetching the token and use the token in CSOM:Best Regards,
Baker Kong -
Marc Mora Gibert 1 Reputation point
2020-08-12T15:42:30.963+00:00 Hi, there's a way to get Sharepoint Authentication Cookie with this new Authentication model? With old SharepointOnlineCredentials , we used GetAuthenticationCookie method to get this, but with new system I don't know how can I get this. Is it posible?
Thanks!