web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Plugin synchrone issue system security

(0) ShareShare
ReportReport
Posted on by 5

Hello 

whtin a CRM online ( sandbox) we attach a  synchrone post create plugin where we  are calling an external api using an httpclient request 

the following issue appear :

pastedimage1678461664607v1.png

any workaround please ? 

I have the same question (0)
  • Suggested answer
    PabloCRP Profile Picture
    1,088 on at
    RE: Plugin synchrone issue system security

    Hi, I assume that the image above it's run within a plugin profile, making calls to external service in plugin profile result in a System.Security.SecurityExceptions when debugging, I sugest do the following:

     - Ensure your plugin is build in .Net Framework 4.6.2 or greater 

    - Test your service but using Unit Tests, XUnit, MSTests... or using a client (Postman, Insomnia, etc) and ensure it responds correctly, the status codes will tell you.... (200,202,400,etc)

    - You could log your request using  ITracingService from plugins so you will be able to do something like "TracingService.Trace(json);" and copy the  request and use it in the step mentioned before.

    regards.

    If it was helpful please consider mark it as verified answer

  • Jamil Lamyae Profile Picture
    5 on at
    RE: Plugin synchrone issue system security

    thank you fo the reply

    I stop the profiling and testing using the trace and executing the request throw postman (it repond 201)

    but throw plugin still having the same issue 403 forbidden 

    pastedimage1678655333938v1.png

  • PabloCRP Profile Picture
    1,088 on at
    RE: Plugin synchrone issue system security

    using c# Unit test gives you a 200's status response?

    403 status code mean "I know how you are but you don't have the right access to do this" so check the api key you are passing in headers request or bearer token you are creating against your API.

  • Jamil Lamyae Profile Picture
    5 on at
    RE: Plugin synchrone issue system security

    using unit test it returns response empty respone= ""

    pastedimage1678695819077v1.png

    using the trace it doesn't return the response trace==> their is no tracing for the response 

    pastedimage1678697012957v3.png

    using the profiler it returne error system security 

    pastedimage1678696509138v2.png

    the same json and endpoint are well responding using postman 

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 120

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 120 Super User 2025 Season 2

#3
#ManoVerse Profile Picture

#ManoVerse 56

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans