I have made plugin on CRM task post trigger. When task is created in CRM then event is created in gmail using google calendar api. I had register this plugin successfully. Now when I create task then it gives me error like "
Request for the permission of type 'System.Security.Permissions.RegistryPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed
"
While running this code I have got error.
credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
new ClientSecrets
{
ClientId = "1111111111111-xxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com",
ClientSecret = "xxxxxxxxxxxxxxxxxxxx",
},
new[] { CalendarService.Scope.Calendar },
"user",
CancellationToken.None,
null).Result;
This code is working fine when I have run this separate environment.when I register this code in CRM plugin then it shows me error.
*This post is locked for comments