I have requirement to get file stream of share point file, for the that I have share point file URL.
"sharepointsite.com/.../File01_07262017.pdf"
I’m trying to connect to SharePoint Online (using CSOM) from within a plugin in CRM Online . For that to work, I merged the SharePoint Client and Client.Runtime DLL’s with ilmerge.exe into my plugin DLL. But as soon as the following code:
ClientContext clientContext = new ClientContext(server);
clientContext.Credentials = new SharePointOnlineCredentials(UserId, Password); //This line throws an below exception:
Request for the permission of type ‘System.Security.Permissions.RegistryPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′ failed.
Is there any way to make it working?
Thanks,
Krutesh