I am using the below code to integrate SharePoint online & Dynamics 365 Online for creating folder in SharePoint. When i tried this code on console application it's working fine. But same code is not working if i registered as a plugin in CRM. While debugging the code i am getting the error in the highlighted line.
Uri MsoSTSUri = new Uri(msoStsUrl);
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(MsoSTSUri);
byte[] responseData = HttpHelper.SendHttpRequest(
MsoSTSUri,
"POST",
saml11RTBytes,
"application/soap+xml; charset=utf-8",
request,
null);
I Would appreciate any help fix this issue.
Thanks,
Kanagaraj Pandian.