oktaokta-api

How to construct valid event Webhook endpoint/url for OKTA Event Hook?


I have created AllowAnonymous HttpPost action method i.e UserUnassignedFromOktaAsnc and trying to configure in Okta event Hook endpoint

if a okta user get unassigned from okta portal , UserUnassignedFromOktaAsnc action method will be called to de-active user and prevent login.

our Enterprise application has been built on asp.net MVC 4.5 and deployed in Azure App service.

It seems we can't directly configure endpoint in Okta, Okta document suggest we have to construct event hook endpoint/URL through ngrok or hookdeck.

I would like to know

  1. Is there any other way to construct okta valid end point/URL?
  2. Do we also need to deploy ngrok or hookdeck along with Enterprise application in Azure App service , and must be up and running.

enter image description here


Solution

  • Step 1 : we have to configure Event hook properly , if you are using localhost follow below steps which is shared link by Matt. Install hookdeck and run command as given in screen shot. red color tick mark is correct URL copy it.

    enter image description here

    Step 2 : Configure Event hook with correct URL, generally we should create one event hook for one okta event. google it to see all event which is provided by Okta. enter image description here Step 3 : If you want to post locally , click on preview and select event type , Json will be loaded by Okta and click 'Deliver Request' . enter image description here Step 4: if you correctly configured , your ASP.Net MVC action method will called. and also you can see post method log (refer first screenshot). you can notice [Error]. Because http although I have configured with https. may be require to create local https certificate and add it.