问题
I have CSOM packaged installed as you can see:
And i cannot install sharepoint package or runtime because it says its not compatible with my version 3.1 ...
So this is a repeated question, but the thing is i cant comment and in any other post people tell us to install all this packages i talked before... How can i use SharePointOnlineCredentials? Thanks for any help
回答1:
SharePointOnlineCredentail isn't supported in .NET Standard platform any more.
Please check the official document here for more details:
A solution would register Azure AD App and use this App get the access token for authentcaition.
You can refer the official document above for detailed code sample.
回答2:
All you need is Microsoft.SharePointOnline.CSOM
NuGet package.
You will find SharePointOnlineCredentials
in Microsoft.SharePoint.Client
namespace:
var creds = new SharePointOnlineCredentials(username, password);
来源:https://stackoverflow.com/questions/64026245/why-do-i-have-error-on-sharepointonlinecredentials-namespace-not-found