Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Enable-AzSqlServerActiveDirectoryOnlyAuthentication

Module:
Az.Sql Module

Enables Microsoft Entra-only authentication for a specific SQL Server.

Syntax

UseResourceGroupAndServerNameParameterSet (Default)

Enable-AzSqlServerActiveDirectoryOnlyAuthentication
 [-ResourceGroupName] <String>
 [-ServerName] <String>
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

UseInputObjectParameterSet

Enable-AzSqlServerActiveDirectoryOnlyAuthentication
 -InputObject <AzureSqlServerModel>
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

UserResourceIdParameterSet

Enable-AzSqlServerActiveDirectoryOnlyAuthentication
 [-ResourceId] <String>
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

Description

The Enable-AzSqlServerActiveDirectoryOnlyAuthentication cmdlet enables Microsoft Entra-only authentication requirement for an AzureSQL Server in the current subscription.

Examples

Example 1

Enable-AzSqlServerActiveDirectoryOnlyAuthentication -ResourceGroupName "ResourceGroup01" -ServerName "Server01"
ResourceGroupName ServerName AzureADOnlyAuthentication
----------------- ---------- ----------- -------- -----------
ResourceGroup01 Server01 True

This command enables Microsoft Entra-only authentication requirement for an AzureSQL server named Server01 that is associated with a resource group named ResourceGroup01.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

-InputObject

The SQL server object to use.

Parameter properties

Type:AzureSqlServerModel
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ResourceGroupName

The name of the resource group.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ResourceId

The resource id of instance to use

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ServerName

The name of the Azure SQL Server the Microsoft Entra-only authentication is in.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

CommonParameters

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.

Inputs

String

Outputs

Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Model.AzureSqlServerActiveDirectoryOnlyAuthenticationModel

Related Links


Feedback

Was this page helpful?