question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[QUESTION] Is DefaultAzureCredential supported

See original GitHub issue

Question

By looking at this https://github.com/microsoft/mssql-jdbc#azure-key-vault-and-azure-active-directory-authentication-dependencies, seems like the azure-identity is included when talking to Azure AD. I am wondering whether the DefaultAzureCredential is supported.

Relevant Issues and Pull Requests

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
tkyccommented, Oct 26, 2022

Hey all, an upcoming preview with this feature will be released on Nov 3rd.

1reaction
tkyccommented, Oct 28, 2022

@saragluna Apologies, official docs aren’t available yet.

To use the DefaultAzureCredential, you just need to do the following:

  • Add the property/value pair authentication=DefaultAzureCredential to your connection string

  • To use the ManagedIdentityCredential in the DefaultAzureCredential, additionally provide user=<your-managed-identity-client-id> or msiClientId=<your-managed-identity-client-id> to your connection string eg. jdbc:sqlserver://<your-server-name>:1433;database=<your-database-name>;authentication=DefaultAzureCredential;user=<your-managed-identity-client-id>;

  • To use the IntellijCredential on windows, set the environment variable INTELLIJ_KEEPASS_PATH to the location of your keepass file eg. INTELLIJ_KEEPASS_PATH=C:\user\your\path\to\the\keepass\file` (This is not needed on linux)

  • To provide additional tenants, use the ADDITIONALLY_ALLOWED_TENANTS environment variable. This is a comma delimited list eg. ADDITIONALLY_ALLOWED_TENANTS=<your-tenant-id-0>,<your-tenant-id-1>,<your-tenant-id-2>,....

Otherwise, if you setup the appropriate configurations mentioned here at the official Azure Identity doc, the other credential types under the DefaultAzureCredential (eg. Environment, CLI, Powershell credentials), then it should also work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

should I handle DefaultAzureCredential's accessToken expiry ...
I use DefaultAzureCredential, as it works locally and also on cloud ... Question: Does Azure Java SDK handles accessToken & refreshToken ...
Read more >
Azure.Identity.CredentialUnavailableException ...
On a new azure vm that supports identity everything works fine, but this application is hosted on a classic azure vm that does...
Read more >
@azure/identity - npm
All credential types provided by @azure/identity are supported in ... This is because the DefaultAzureCredential combines credentials ...
Read more >
DefaultAzureCredential: Unifying How We Get Azure AD Token
Azure Identity library provides Azure Active Directory token authentication support across the Azure SDK.
Read more >
Azure Identity client library for .NET
This library is in preview and currently supports: ... DefaultAzureCredential, service principal or managed identity, none for managed identity; ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found