Issue running job using Elastic Job Agent in dedicated SQL Pool (User Managed Identity)

Kshitij Gurung 20 Reputation points
2024-09-11T22:08:23.3833333+00:00

I have an Azure SQL Server with a dedicated SQL Pool (probably prior to 2020) and a reporting database. I am trying to run elastic job agent using User Managed Identities (UMI) on all database in this Azure SQL Server. I have set up all the logins, users, permission on both the job database and target server/databases (Azure SQL Server/dedicated SQL Pool/reporting database) as per Microsoft documentation. When I run the elastic job, it runs just fine in reporting database, but it fails on the dedicated SQL Pool due saying, " Failed to connect to the target database: Login failed for user '<token-identified principal>;.error <token-identify-problem). I can't seem to figure out why. is UMI even compatible Elastic Job dedicates SQL Pool?

Azure SQL Database
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,902 questions
{count} votes

Accepted answer
  1. Oury Ba-MSFT 19,346 Reputation points Microsoft Employee
    2024-09-27T17:53:31.13+00:00

    @Kshitij Gurung

    Elastic job works with elastic pools and UMI also works for connecting to target server, enumerating list of DBs in a pool and executing jobs there. Make sure that you have created a user from UMI in master database and each of the target databases including databases in the pool with appropriate permissions to run the job there.

     

    -- If target is a server/pool, create user from [EXTERNAL PROVIDER]

    In the target server's master database

    DROP USER IF EXISTS [jobuserUMI] GO 

    -- Create user from the User managed identity

    CREATE USER [jobuserUMI] FROM EXTERNAL PROVIDER; 

    GO

    Regards,

    Oury


0 additional answers

Sort by: Most helpful

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.