1. Packages
  2. Azure Classic
  3. API Docs
  4. mssql
  5. ManagedInstanceActiveDirectoryAdministrator

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
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:

    LoginUsername string
    ManagedInstanceId string
    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
    ObjectId string
    The Object ID of the principal to set as the Managed Instance Administrator.
    TenantId string
    The Azure Active Directory Tenant ID.
    AzureadAuthenticationOnly bool
    When true, only permit logins from AAD users and administrators. When false, also allow local database users. Defaults to false.
    LoginUsername string
    ManagedInstanceId string
    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
    ObjectId string
    The Object ID of the principal to set as the Managed Instance Administrator.
    TenantId string
    The Azure Active Directory Tenant ID.
    AzureadAuthenticationOnly bool
    When true, only permit logins from AAD users and administrators. When false, also allow local database users. Defaults to false.
    loginUsername String
    managedInstanceId String
    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
    objectId String
    The Object ID of the principal to set as the Managed Instance Administrator.
    tenantId String
    The Azure Active Directory Tenant ID.
    azureadAuthenticationOnly Boolean
    When true, only permit logins from AAD users and administrators. When false, also allow local database users. Defaults to false.
    loginUsername string
    managedInstanceId string
    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
    objectId string
    The Object ID of the principal to set as the Managed Instance Administrator.
    tenantId string
    The Azure Active Directory Tenant ID.
    azureadAuthenticationOnly boolean
    When true, only permit logins from AAD users and administrators. When false, also allow local database users. Defaults to false.
    login_username str
    managed_instance_id str
    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_only bool
    When true, only permit logins from AAD users and administrators. When false, also allow local database users. Defaults to false.
    loginUsername String
    managedInstanceId String
    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
    objectId String
    The Object ID of the principal to set as the Managed Instance Administrator.
    tenantId String
    The Azure Active Directory Tenant ID.
    azureadAuthenticationOnly Boolean
    When true, only permit logins from AAD users and administrators. When false, also allow local database users. Defaults to false.

    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) -> ManagedInstanceActiveDirectoryAdministrator
    func 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.
    The following state arguments are supported:
    AzureadAuthenticationOnly bool
    When true, only permit logins from AAD users and administrators. When false, also allow local database users. Defaults to false.
    LoginUsername string
    ManagedInstanceId string
    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
    ObjectId string
    The Object ID of the principal to set as the Managed Instance Administrator.
    TenantId string
    The Azure Active Directory Tenant ID.
    AzureadAuthenticationOnly bool
    When true, only permit logins from AAD users and administrators. When false, also allow local database users. Defaults to false.
    LoginUsername string
    ManagedInstanceId string
    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
    ObjectId string
    The Object ID of the principal to set as the Managed Instance Administrator.
    TenantId string
    The Azure Active Directory Tenant ID.
    azureadAuthenticationOnly Boolean
    When true, only permit logins from AAD users and administrators. When false, also allow local database users. Defaults to false.
    loginUsername String
    managedInstanceId String
    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
    objectId String
    The Object ID of the principal to set as the Managed Instance Administrator.
    tenantId String
    The Azure Active Directory Tenant ID.
    azureadAuthenticationOnly boolean
    When true, only permit logins from AAD users and administrators. When false, also allow local database users. Defaults to false.
    loginUsername string
    managedInstanceId string
    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
    objectId string
    The Object ID of the principal to set as the Managed Instance Administrator.
    tenantId string
    The Azure Active Directory Tenant ID.
    azuread_authentication_only bool
    When true, only permit logins from AAD users and administrators. When false, also allow local database users. Defaults to false.
    login_username str
    managed_instance_id str
    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.
    azureadAuthenticationOnly Boolean
    When true, only permit logins from AAD users and administrators. When false, also allow local database users. Defaults to false.
    loginUsername String
    managedInstanceId String
    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
    objectId String
    The Object ID of the principal to set as the Managed Instance Administrator.
    tenantId 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 azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.