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.

Support Azure Managed Identities via SQL Server connection string

See original GitHub issue

Problem

Cannot use Active Directory Managed connection strings to connect to Azure SQL Server

e.g. The following DATABASE_URL generates an error message

sqlserver://tcp:{SQL_SERVER_NAME}.database.windows.net,1433;Database={DATABASE_NAME};Authentication=Active Directory Managed;

Gives:

Conversion error: invalid digit found in database URL

Suggested solution

Support use of the connection string format above to allow the use of Azure Function System Managed Identities for Azure SQL Server connections

Alternatives

Additional context

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
oriarazicommented, Aug 16, 2022

E> Implementation of what exactly? Can you maybe provide some documentation link?

With token based authentication

https://docs.microsoft.com/en-us/azure/postgresql/single-server/how-to-connect-with-managed-identity

Edit: I can see it is under work, just making sure it will support also PostgreSQL databases.

0reactions
janpiocommented, Aug 20, 2022

Thanks for that link, currently we are indeed only playing with this for SQL Server (which we use tiberius for to talk to).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tutorial: Access data with managed identity - Azure App Service
Tutorial: Connect to SQL Database from .NET App Service without secrets using a managed identity · 1. Grant database access to Azure AD...
Read more >
Passwordless connection string to Azure SQL database using ...
1. Set an "Azure Active Directory Admin" for the database server. · 2. Create a managed identity · 3. Create external database roles...
Read more >
C# SQL Connection Using Azure Managed Identity
Basically, with Managed Identity you establish a trust between a server and a resource. For example, if you have a SQL server and...
Read more >
How to Use Managed Identities with Azure SQL Database
Managed identities is a Microsoft Azure feature that allows Azure resources to authenticate or authorize themselves with other supported ...
Read more >
Eliminate Secrets from Your Applications with Azure Managed ...
This is done with an attribute in the SQL Server connection string - Authentication. Specifying Azure Active Directory with the Authentication ...
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