Azure Sql Managed Instance - Service Principal access issue

pdsqsql 411 Reputation points
2025-02-27T17:16:01.3666667+00:00

We have configured Sql Managed Instance and currently configured MS Entra MFA but we can't use for application login/Service account which is prompting for MFA so we have created Service Principal and provided access after adding into Managed Sql Server Instance Database.

I am able to connect to the Instance/Database and can run SELECT but can't run DML statement (Insert/Update/Delete).

I have provided Read and Write access also, evne thogu I have added DB_Owner role permission but still getting error:

The UPDATE permission was denied on the object 'order', database 'Ordertest', schema 'dbo'

Appreciate your feedback!

Thank you in advance!

Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. Erland Sommarskog 117.8K Reputation points MVP
    2025-02-27T22:58:05.0233333+00:00

    Apparently, you have granted permissions to another principal than the one you think you did. Or you granted permissions in the wrong database.

    Have the application to run

    SELECT SYSTEM_USER, * FROM sys.user_token
    

    to see what comes back.


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.