Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Invoking a web hook from a plugin

(0) ShareShare
ReportReport
Posted on by 146

Hi,

I'm trying to invoke a web hook from a plugin, which works successfully but the string returned from IServiceEndpointNotificationService.Execute is null.


web hook:
 public static async Task<HttpResponseMessage> Run([HttpTrigger(AuthorizationLevel.Function, "post", WebHookType = "genericJson", Route = null)]HttpRequestMessage req, TraceWriter log)

just returning:
            var contextJson = await req.Content.ReadAsStringAsync();
            var context = contextJson.GetContext();
            return req.CreateResponse(HttpStatusCode.OK, "Created");

I'm calling the web hook from the plugin with this line:

 cloudService.Execute(new EntityReference("serviceendpoint", endpoint.Id), Context);

I can see in my plugin traces and azure logs that the function is being hit and returning the right message (also seen from postman) but when it gets back to the plugin the response message is null.


The plugin is running synchonously, tried on pre-operation and post-operation but no difference.

Any ideas?

Thanks

  • Davina Sungum Profile Picture
    146 on at
    RE: Invoking a web hook from a plugin

    Thanks Wahaj, I have updated my post with the correct information with the response message being null and will leave this open incase there are any other suggestion (as well as you looking at it on the other thread)

  • Suggested answer
    Wahaj Rashid Profile Picture
    11,321 on at

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 181 Super User 2025 Season 1

#2
Siv Sagar Profile Picture

Siv Sagar 149 Super User 2025 Season 1

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 124 Super User 2025 Season 1

Product updates

Dynamics 365 release plans