Attempting to set Admin on SQL Managed Instance fails with error

Ben Sykes 20 Reputation points
2025-05-27T16:34:51.3666667+00:00

From the Microsoft Entra ID tab of the SQL Managed Instance, attempt to set Admin. The instance has been live for several days.

The error message "Failed to set the Microsoft Entra admin. Details: Failed to set the Microsoft Entra admin for managed instance: dev-sql. The operation with Id: 'dev-sql' does not exist." indicates that there was an issue with setting the Microsoft Entra admin for the specified managed instance.

We have attempted to add a single user as well as a security group. The security group previously worked for a SQL Database but we had to switch to a SQL Managed Instance due to missing features.

This does not appear to be a permission issue, as the same action has been attempted by our account owner with full permission.

Azure SQL Database
{count} votes

Accepted answer
  1. Mahesh Kurva 5,025 Reputation points Microsoft External Staff Moderator
    2025-05-28T00:10:11.4733333+00:00

    Hi Ben Sykes,

    Greetings!

    As I understand it, you're encountering a frustrating issue while trying to set the Microsoft Entra admin for your SQL Managed Instance.

    1.Please confirm whether you have attempted to set the Microsoft Entra admin from the Microsoft Entra ID tab of the SQL Managed Instance. If not, kindly try connecting by following the steps in the document below.

    Azure SQL Managed Instance.

    2.If a user with the same name already exists, the setup might fail. Try changing the username and retry the operation

    3.Ensure that the directory containing your Azure SQL resource is set as the current directory in the Azure portal. This can sometimes be overlooked and might cause issues with setting the admin.

    User's image 4.If there were any previously set administrators that you might not need anymore, consider removing them and then trying to add the new admin again.

    Reference links:

    https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql

    https://techcommunity.microsoft.com/blog/azuredbsupport/tips--tricks-3-unable-to-set-aad-admin-for-azure-sql-managed-instance/3633802

    https://www.youtube.com/watch?v=KWYv9X5DaKI

    I hope this information helps. Please do let us know if you have any further queries.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.

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.