Access IMDS server or Active Directory MSI method to onprem machine which is joined Azure AD

Copper Contributor

We want to use AzureSqlServer with ActiveDirectoryMSI authentication as well as token-based authentication and We are able to execute successfully from VM created in Azure network and added as a member of the Azure AD group. For that, we have created Contained user by following the link

And added the VM as part of AzureActiveDirectory by following this link MSI Token failure: Failed to acquire token from MSI...

And we are able to access the SQL data without providing username and password using both IMDS server and able to retrieve the token using


ActiveDirectorMSI URIString jdbc:sqlserver://azuresqlserverNAME:1433;databaseName=DatabaseNAME;Authentication=ActiveDirectoryMsi; .

But when it comes to access from Onprem Windows/Linux/Mac (joined as device and made part of Azure AD group where group is set as Admin for Azure Sql server) machine we are not able to access Azure SQL server
Even not able to access IMDS server , when i tried executing java code which does active directory msi even faild saying invoke-WebRequest : unable to connect remote from Powershell and to aquire access token from IMDS,Unexpected error occured from java code using authentication as ActiveDirectoryMSI in jdbc uri.

Can someone please suggest to me in terms of on-prem what needs to be done so we can access AzureSqlServer with ActiveDirectoryMSI Authentication as well as token-based authentication?

0 Replies