Friday, August 28, 2026

Entra ID Integration For VS Code


Over the past few years helping hundreds of customers evaluate Entra ID integration with Oracle AI Database for centralized authentication, authorization and database user life cycle management, I have been surprised how few customers know about SQL Developer's replacement SQL Developer for VS Code.  This is important to to know since SQL Developer support concludes April, 2027.

In this post I walk you through how to install and configure Visual Studio Code for Entra ID and OCI IAM integration.

1. Install Visual Studio Code

The first step is to download and install Visual Studio Code from the download site.
My daily driver is a macOS computer. Therefore, the screenshots will be from that perspective.
The downloaded file for an Apple silicon computer is VSCode-darwin-arm64.dmg. Other options for Apple Intel, Linux and Microsoft operating systems are available at the download site as well.  On my MacBook, I open the dmg file and drag Visual Studio Code app to the Applications folder and then open Visual Studio Code.


2. Install VS Code Extension

The next step is to install the SQL Developer for VS Code extension.  To do this, navigate to the download page at https://www.oracle.com/database/sqldeveloper/vscode/download/.



Click on "Install from Visual Studio Marketplace".  That will take you to the extension on the visual studio marketplace page. 


Once on the VSCode extension page, click on the green and white "Install" button.



This will open Visual Studio Code app and prompt you to install the extension. Click on "Install" and wait for the installer to complete the installation process.



3. Install ojdbc-extensions

The last step for setting up Visual Studio Code for Entra ID and OCI IAM integration is to install the respective libraries from the Maven.  To do this, you first open the Visual Studio Code Terminal panel by clicking on "View" from the top bar and then click on "Terminal".


Then in the command line prompt, click on the arrow next to the plus (+) symbol to pull down the list of command line options and click on "SQLcl". This will open a SQLcl command prompt.


In the SQLcl command prompt, you will install the Entra ID (a.k.a. azure) and OCI IAM SDKs. Once installed list the SDKs to confirm the version installed is at least 1.0.5.  In this case both are version 1.1.0, which is the latest version as of August, 2026.
SQL> sdk install jdbc-zure
Downloading the ojdbc-provider-azure SDK and all its dependencies.
The jdbc-azure SDK is installed successfully, restart SQLcl for changes to take effect
SQL> sdk install jdbc-oci
Downloading the ojdbc-provider-oci SDK and all its dependencies.
The jdbc-oci SDK is installed successfully, restart SQLcl for changes to take effect

SQL> sdk list
+------------+-----------+---------+----------------------------------------------------------------------+
| SDK        | INSTALLED | VERSION | DOCS                                                                 |
+------------+-----------+---------+----------------------------------------------------------------------+
| jdbc-oci   | YES       | 1.1.0   | https://docs.oracle.com/en/database/oracle/oracle-database/23/jjdbc/ |
| jdbc-azure | YES       | 1.1.0   | https://docs.oracle.com/en/database/oracle/oracle-database/23/jjdbc/ |
+------------+-----------+---------+----------------------------------------------------------------------+

4. Add Connections

Now that VSCode extension is configured, add database connections to Visual Studio Code.  The VSCode extension supports multiple connection types including Basic, JDBC URL, TNS, and others. On my computer, I have all connection strings defined in a single tnsnames.ora configuration file that already has my Entra ID and OCI IAM TNS entries.  Therefore, I select TNS for the "Connection Type".  And then I have to specify the path to the tnsnames.ora file.  To do that, click on the SQL Developer icon on the left panel and then click on click on "Create Connection" in the middle panel.


This will open a connection configuration panel on the right. In that panel, click on "Connection Type" and select "TNS" and click on the sprocket symbol to the right of the "TNS File Location".  Enter the path to your tnsadmin.ora configuration file and then click on the X symbol in the upper right hand corner of that Settings box to close that window.


The final configuration step is to enter the "Connection Name" and select the "Network Alias" from the TNS list. In my case, I named the connection "PDB1_19c_ENTRA" and selected "PDB1_19C_ENTRA" from the TNS Network Alias list and then click the "Save" button to save that connection configuration.




5. Restart Visual Studio Code

Even though the ojdbc-extensions libraries have been installed, Visual Studio Code has not yet loaded them. To load the libraries, you most quit and re-open the Visual Studio Code app again.


6. Test Connection

Once the Visual Studio Code app is open and the SQL Developer module has completed loading, click on SQL Developer icon on the left side and then right-click on the database that you want to connect to and click on "Connect".



If the connect string for the selected TNS alias is configured for Entra ID, a browser window will be opened to the Microsoft Entra ID login page (https://login.microsoftonline.com/) and you will be prompted to login to Entra ID.



Once logged in, the SQL Developer PDB1_19c_ENTRA connection will expand to reveal the view of the database under the connection name.




The OCI IAM interactive login configuration has a similar pop-up window to your OCI tenancy login page.

I hope you found this post helpful and informative.

Blessings!

Brad

No comments: