We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
Allows you to set a user, group or service principal as the AAD Administrator for an Azure SQL Managed Instance.
Create ManagedInstanceActiveDirectoryAdministrator Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ManagedInstanceActiveDirectoryAdministrator(name: string, args: ManagedInstanceActiveDirectoryAdministratorArgs, opts?: CustomResourceOptions);@overload
def ManagedInstanceActiveDirectoryAdministrator(resource_name: str,
args: ManagedInstanceActiveDirectoryAdministratorArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ManagedInstanceActiveDirectoryAdministrator(resource_name: str,
opts: Optional[ResourceOptions] = None,
login_username: Optional[str] = None,
managed_instance_id: Optional[str] = None,
object_id: Optional[str] = None,
tenant_id: Optional[str] = None,
azuread_authentication_only: Optional[bool] = None)func NewManagedInstanceActiveDirectoryAdministrator(ctx *Context, name string, args ManagedInstanceActiveDirectoryAdministratorArgs, opts ...ResourceOption) (*ManagedInstanceActiveDirectoryAdministrator, error)public ManagedInstanceActiveDirectoryAdministrator(string name, ManagedInstanceActiveDirectoryAdministratorArgs args, CustomResourceOptions? opts = null)
public ManagedInstanceActiveDirectoryAdministrator(String name, ManagedInstanceActiveDirectoryAdministratorArgs args)
public ManagedInstanceActiveDirectoryAdministrator(String name, ManagedInstanceActiveDirectoryAdministratorArgs args, CustomResourceOptions options)
type: azure:mssql:ManagedInstanceActiveDirectoryAdministrator
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ManagedInstanceActiveDirectoryAdministratorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ManagedInstanceActiveDirectoryAdministratorArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ManagedInstanceActiveDirectoryAdministratorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ManagedInstanceActiveDirectoryAdministratorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ManagedInstanceActiveDirectoryAdministratorArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var managedInstanceActiveDirectoryAdministratorResource = new Azure.MSSql.ManagedInstanceActiveDirectoryAdministrator("managedInstanceActiveDirectoryAdministratorResource", new()
{
LoginUsername = "string",
ManagedInstanceId = "string",
ObjectId = "string",
TenantId = "string",
AzureadAuthenticationOnly = false,
});
example, err := mssql.NewManagedInstanceActiveDirectoryAdministrator(ctx, "managedInstanceActiveDirectoryAdministratorResource", &mssql.ManagedInstanceActiveDirectoryAdministratorArgs{
LoginUsername: pulumi.String("string"),
ManagedInstanceId: pulumi.String("string"),
ObjectId: pulumi.String("string"),
TenantId: pulumi.String("string"),
AzureadAuthenticationOnly: pulumi.Bool(false),
})
var managedInstanceActiveDirectoryAdministratorResource = new com.pulumi.azure.mssql.ManagedInstanceActiveDirectoryAdministrator("managedInstanceActiveDirectoryAdministratorResource", com.pulumi.azure.mssql.ManagedInstanceActiveDirectoryAdministratorArgs.builder()
.loginUsername("string")
.managedInstanceId("string")
.objectId("string")
.tenantId("string")
.azureadAuthenticationOnly(false)
.build());
managed_instance_active_directory_administrator_resource = azure.mssql.ManagedInstanceActiveDirectoryAdministrator("managedInstanceActiveDirectoryAdministratorResource",
login_username="string",
managed_instance_id="string",
object_id="string",
tenant_id="string",
azuread_authentication_only=False)
const managedInstanceActiveDirectoryAdministratorResource = new azure.mssql.ManagedInstanceActiveDirectoryAdministrator("managedInstanceActiveDirectoryAdministratorResource", {
loginUsername: "string",
managedInstanceId: "string",
objectId: "string",
tenantId: "string",
azureadAuthenticationOnly: false,
});
type: azure:mssql:ManagedInstanceActiveDirectoryAdministrator
properties:
azureadAuthenticationOnly: false
loginUsername: string
managedInstanceId: string
objectId: string
tenantId: string
ManagedInstanceActiveDirectoryAdministrator Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ManagedInstanceActiveDirectoryAdministrator resource accepts the following input properties:
- Login
Username string - Managed
Instance stringId - The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
- Object
Id string - The Object ID of the principal to set as the Managed Instance Administrator.
- Tenant
Id string - The Azure Active Directory Tenant ID.
- Azuread
Authentication boolOnly - When
true, only permit logins from AAD users and administrators. Whenfalse, also allow local database users. Defaults tofalse.
- Login
Username string - Managed
Instance stringId - The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
- Object
Id string - The Object ID of the principal to set as the Managed Instance Administrator.
- Tenant
Id string - The Azure Active Directory Tenant ID.
- Azuread
Authentication boolOnly - When
true, only permit logins from AAD users and administrators. Whenfalse, also allow local database users. Defaults tofalse.
- login
Username String - managed
Instance StringId - The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
- object
Id String - The Object ID of the principal to set as the Managed Instance Administrator.
- tenant
Id String - The Azure Active Directory Tenant ID.
- azuread
Authentication BooleanOnly - When
true, only permit logins from AAD users and administrators. Whenfalse, also allow local database users. Defaults tofalse.
- login
Username string - managed
Instance stringId - The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
- object
Id string - The Object ID of the principal to set as the Managed Instance Administrator.
- tenant
Id string - The Azure Active Directory Tenant ID.
- azuread
Authentication booleanOnly - When
true, only permit logins from AAD users and administrators. Whenfalse, also allow local database users. Defaults tofalse.
- login_
username str - managed_
instance_ strid - The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
- object_
id str - The Object ID of the principal to set as the Managed Instance Administrator.
- tenant_
id str - The Azure Active Directory Tenant ID.
- azuread_
authentication_ boolonly - When
true, only permit logins from AAD users and administrators. Whenfalse, also allow local database users. Defaults tofalse.
- login
Username String - managed
Instance StringId - The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
- object
Id String - The Object ID of the principal to set as the Managed Instance Administrator.
- tenant
Id String - The Azure Active Directory Tenant ID.
- azuread
Authentication BooleanOnly - When
true, only permit logins from AAD users and administrators. Whenfalse, also allow local database users. Defaults tofalse.
Outputs
All input properties are implicitly available as output properties. Additionally, the ManagedInstanceActiveDirectoryAdministrator resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ManagedInstanceActiveDirectoryAdministrator Resource
Get an existing ManagedInstanceActiveDirectoryAdministrator resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ManagedInstanceActiveDirectoryAdministratorState, opts?: CustomResourceOptions): ManagedInstanceActiveDirectoryAdministrator@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
azuread_authentication_only: Optional[bool] = None,
login_username: Optional[str] = None,
managed_instance_id: Optional[str] = None,
object_id: Optional[str] = None,
tenant_id: Optional[str] = None) -> ManagedInstanceActiveDirectoryAdministratorfunc GetManagedInstanceActiveDirectoryAdministrator(ctx *Context, name string, id IDInput, state *ManagedInstanceActiveDirectoryAdministratorState, opts ...ResourceOption) (*ManagedInstanceActiveDirectoryAdministrator, error)public static ManagedInstanceActiveDirectoryAdministrator Get(string name, Input<string> id, ManagedInstanceActiveDirectoryAdministratorState? state, CustomResourceOptions? opts = null)public static ManagedInstanceActiveDirectoryAdministrator get(String name, Output<String> id, ManagedInstanceActiveDirectoryAdministratorState state, CustomResourceOptions options)resources: _: type: azure:mssql:ManagedInstanceActiveDirectoryAdministrator get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Azuread
Authentication boolOnly - When
true, only permit logins from AAD users and administrators. Whenfalse, also allow local database users. Defaults tofalse. - Login
Username string - Managed
Instance stringId - The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
- Object
Id string - The Object ID of the principal to set as the Managed Instance Administrator.
- Tenant
Id string - The Azure Active Directory Tenant ID.
- Azuread
Authentication boolOnly - When
true, only permit logins from AAD users and administrators. Whenfalse, also allow local database users. Defaults tofalse. - Login
Username string - Managed
Instance stringId - The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
- Object
Id string - The Object ID of the principal to set as the Managed Instance Administrator.
- Tenant
Id string - The Azure Active Directory Tenant ID.
- azuread
Authentication BooleanOnly - When
true, only permit logins from AAD users and administrators. Whenfalse, also allow local database users. Defaults tofalse. - login
Username String - managed
Instance StringId - The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
- object
Id String - The Object ID of the principal to set as the Managed Instance Administrator.
- tenant
Id String - The Azure Active Directory Tenant ID.
- azuread
Authentication booleanOnly - When
true, only permit logins from AAD users and administrators. Whenfalse, also allow local database users. Defaults tofalse. - login
Username string - managed
Instance stringId - The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
- object
Id string - The Object ID of the principal to set as the Managed Instance Administrator.
- tenant
Id string - The Azure Active Directory Tenant ID.
- azuread_
authentication_ boolonly - When
true, only permit logins from AAD users and administrators. Whenfalse, also allow local database users. Defaults tofalse. - login_
username str - managed_
instance_ strid - The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
- object_
id str - The Object ID of the principal to set as the Managed Instance Administrator.
- tenant_
id str - The Azure Active Directory Tenant ID.
- azuread
Authentication BooleanOnly - When
true, only permit logins from AAD users and administrators. Whenfalse, also allow local database users. Defaults tofalse. - login
Username String - managed
Instance StringId - The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
- object
Id String - The Object ID of the principal to set as the Managed Instance Administrator.
- tenant
Id String - The Azure Active Directory Tenant ID.
Import
An Azure SQL Active Directory Administrator can be imported using the resource id, e.g.
$ pulumi import azure:mssql/managedInstanceActiveDirectoryAdministrator:ManagedInstanceActiveDirectoryAdministrator administrator /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/managedInstances/mymanagedinstance/administrators/activeDirectory
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
