Benefits of System Assigned Managed identity on Azure SQL server

Priya Jha 896 Reputation points
2022-11-23T10:52:32.817+00:00

Hi All,

I do know the benefits of Managed identity on entities like Azure data factory, synapse etc. wherein we can avoid using service principals or creds to authenticate with source/sink.

But what are the use cases/benefits of assigning a SAMI to an Azure SQL database? Is it possible to generate OAuth token within Azure SQL DB via tsql script in case if I set up managed identity and authenticate to AD

Azure SQL Database
{count} votes

Accepted answer
  1. Nandan Hegde 36,151 Reputation points MVP Volunteer Moderator
    2022-11-23T11:45:25.387+00:00

    One of the use case which comes at the top of my mind is external database scoped credential authentication can be done via managed identity.
    Similar email thread:
    https://stackoverflow.com/questions/65520274/access-azure-storage-account-via-synapse-through-managed-identity

    But I am not sure whether we can generate OAuth /Access Token via TSQL within Azure SQL Database

    @Alberto Morillo @Ronen Ariely @Erland Sommarskog : Any thoughts w.r.t Access token? Thanks in advance for your thoughts

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Zeeshan Nasir Bajwa 656 Reputation points Student Ambassador
    2022-11-23T10:55:51.677+00:00

    There are many benefits to using a SAMI with an Azure SQL database. SAMIs can be used to authenticate to Azure SQL databases using Azure Active Directory (AD), which can simplify identity management and provide better security. SAMIs can also be used to generate OAuth tokens, which can be used to access other Azure services more securely and easily.
    There are several benefits of using a system-assigned managed identity on an Azure SQL server:

    1. Azure SQL servers can be registered with Azure Active Directory (Azure AD) and given a managed identity. This allows the server to authenticate with Azure services that support Azure AD authentication, such as Azure Key Vault.
    2. Azure SQL servers that have a system-assigned managed identity can be granted access to Azure resources, such as storage accounts, without the need to store credentials in the SQL server.
    3. System-assigned managed identities on Azure SQL servers are managed by Azure and have built-in protection against accidental deletion or modification.
    4. Azure SQL servers with system-assigned managed identities can take advantage of Azure Resource Manager's role-based access control to fine-tune access to Azure resources.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.