DEV Community

Mrinmoy Aich
Mrinmoy Aich

Posted on

Oracle Visual Builder (VB) Authentication Using External Identity Provider Instead of Oracle IAM

Business Scenario:

A large enterprise wants to build a Vendor Management Portal using Oracle Visual Builder (VB) but prefers to use Azure Active Directory (Azure AD) for authentication instead of Oracle Identity Cloud Service (IDCS).

The goal is to:

  • Authenticate users via Azure AD instead of IDCS.

  • Fetch user details (Name, Email, Role, etc.) from Azure AD.

  • Allow only authorized users to access the application.

  • Enable seamless integration with existing enterprise identity management.

Implementation :

Configurations in Azure.

  1. Azure Configuration:
  • The user should log in to the Microsoft Azure Cloud Environment.

Azure login

  • Create an application from the link “App Registration”.

App Registration

  • Click on “New Registration” link.

New Registration

  • Provide a name for the application.

  • Choose the supported account types as “Personal Microsoft
    accounts only”.

  • Choose the Redirect URI as “Single page application” and
    redirect url is your VB application, like https://xxx-xxxx-
    oic-portals.builder.us-phoenix-
    1.ocp.oraclecloud.com/ic/builder/rt/OracleUtilityDemo/1.0/webApps/utilityapp.

  • Then click on “Register”.

register

  • From the “App Registration” page, click on the newly created app.

App Registration Page

  • From the following page, capture the below information.

    Client ID : 1de6e6e9-27ae-49a3-95a8-8afc4a2af71b

Also ask your Azure Admin to provide the tenant id for Azure.

This will complete your Azure activities.


2 Visual Builder Work:

  • Create a VB application and put the functionalities you want to create for the app.
  • Now the following task needed to integrate Microsoft authentication in front of your Visual Builder application.
  • For this application, we need to use a custom security provider.
  • First inside the Visual Builder application, we will import a javascript file called “msal-browser.min.js"

msal.js

  • Now you need to do the major step by creating a Security provider for Azure. To implement an AzureSecurityProvider that extends the DefaultSecurityProvider and overrides the fetchCurrentUser(config) method, you would typically create a custom security provider in a JavaScript environment, possibly in an application framework where security or authentication providers can be customized. There are few methods which present in DefaultSecurityProvider. Which we need to overwrite in this custom security provider.

Security Provider

  • On the Web Apps tab in the Navigator, select your web app, then click the JSON tab to open the app-flow.json file. Search for the following part and change with your security provider.

"userConfig": {
"type": "resources/js/azureSecurityProvider",
"configuration": {
},
"embedding": "deny"
}

Now Stage the VB application and run it.

  1. Running the Application :
  • Once we will run the application Microsoft login page will appear.

MS Login

  • Your new login screen.

login

  • It will ask for password.

enter password

Once you login successfully, it will redirect you to your Visual Builder application and display the data.

display data

Thank you.

Top comments (0)