Skip to content

Access Azure MSSQL with AccessToken from Azure Managed Service Identity (MSI) #4510

@iqmeta

Description

@iqmeta

Issue type:

[x] question
[ ] bug report
([x] feature request)
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[x] mssql (AZURE)
[ ] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo

TypeORM version:

[x] latest
[x] @next
[ ] 0.x.x (or put your version here)

Steps to reproduce or a small repository showing the problem:

Hi,
with the .net Framework 4.6 it is possible to Access / Connect to
an MSSQL with a Token...

https://docs.microsoft.com/en-gb/azure/active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-sql

like:

//
// Open a connection to the SQL server using the access token.
//
if (accessToken != null) {
    string connectionString = "Data Source=<AZURE-SQL-SERVERNAME>; Initial Catalog=<DATABASE>;";
    SqlConnection conn = new SqlConnection(connectionString);
    conn.AccessToken = accessToken;
    conn.Open();
}

Any idea or chance to do this with typeorm as well? 🙈

Cheers Otto.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions