The Set-AzSqlInstanceActiveDirectoryAdministrator cmdlet provisions a Microsoft Entra administrator for AzureSQL Managed Instance in the current subscription.
You can provision only one administrator at a time.
The following members of Microsoft Entra ID can be provisioned as a SQL Managed Instance administrator:
Native members of Microsoft Entra ID
Federated members of Microsoft Entra ID
Microsoft Entra groups created as security groups
Imported members from other Azure ADs are not supported as administrators.
Microsoft accounts, such as those in the Outlook.com, Hotmail.com, or Live.com domains, are not supported as administrators.
Other guest accounts, such as those in the Gmail.com or Yahoo.com domains, are not supported as administrators.
We recommend that you provision a dedicated Microsoft Entra group as an administrator.
Examples
Example 1: Provision an administrator group for a managed instance associated with resource group
This command provisions a Microsoft Entra administrator group named DBAs for the managed instance named ManagedInstance01.
This server is associated with resource group ResourceGroup01.
Example 2: Provision an administrator user using managed instance object
Specifies the display name of the user or group for whom to grant permissions.
This display name must exist in the active directory associated with the current subscription.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.