Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Dyanmic 365 Plugin - Systems Security permission issue.

Posted on by 900

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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans