JMJ CLOUD
  • Home
  • Projects
  • Blog
  • About Us
  • Contact Us

Our Blog

Create OKTA Users using REST - #JoelKallmanDay

10/11/2021

0 Comments

 
Using the Social Signon capabilities in APEX, you can authenticate your users with a wide range of identity providers such as OKTA, Auth0 or Azure/MS365.  We've blogged about that here: its-time-for-a-new-name-for-apex-social-sign-in.html
But what if you need to maintain those users from APEX - for example, to enroll a new user?   That's where Oracle APEX's built-in APEX_WEB_SERVICE package comes in handy.   This blog post shows you how to achieve this.
Step 1 - Get an OKTA account
In order to use the Okta REST API you'll need an Okta account with a given Okta subdomain, eg "dev-313934".    You'll also need to create an API token on this account, which is used for authentication with the REST API, eg "00h5I0GvKUa41234234q80JTds6A21342134".
Picture
Step 2 - Review the OKTA APIs
You can create a user with either one or two REST API calls:
Code Editor

    
{okta_domain} is your Okta domain and {user_id} is the internal user ID of the specific user, returned by the first REST API call.

As other REST API calls depend upon this, you'll need a mapping table between the user ID e-mail address and Okta user ID (see later).
​
The REST API returns HTTP 200 OK for success, HTTP 400 Bad Request for errors with JSON details about the error.
You cannot delete a given user in one step, the user needs to be deactivated first. ​

    

​Once again, {okta_domain} is your Okta domain and {user_id} is the internal user ID of the specific user, returned by the create user REST API call.
The REST API returns HTTP 200 OK/204 No Content for success, HTTP 400 Bad Request for errors with JSON details about the error.
Step 3 - Implement in PL/SQL
The REST API calls can then be wrapped up in a PL/SQL package using APEX_WEB_SERVICE.   

    
  

    
Step 4 - Test Your Implementation

    
Conclusion
APEX_WEB_SERVICE makes it simple to call REST APIs and integration your APEX apps with third party identity providers.

On #JoelKallmanDay, we remain grateful to Joel Kallman and the APEX team for the amazing Oracle product and community they built.
0 Comments

    RSS Feed

    Popular Posts

    - APEX Dog Food
    - Cloud ERP & APEX Mashup
    - Modernizing EBS with APEX
    - Easy APEX_WEB_SERVICE
    - Running APEX in RDS
    - ORDS What & Why?

    Categories

    All
    APEX
    AWS
    Fusion Cloud ERP
    INTEGRATION
    MS GRAPH
    OCI
    ORDS
    PaaS
    RAD
    REST
    SOAP

    Archives

    October 2021
    February 2021
    January 2021
    October 2020
    September 2020
    June 2020
    May 2020
    April 2020
    February 2020
    January 2020
    October 2019
    September 2019
    August 2019
    July 2019
    June 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    September 2017
    August 2017
    July 2017
    June 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016

Company

About
Contact
Blog
  • Home
  • Projects
  • Blog
  • About Us
  • Contact Us