Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Sql/Sql/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* Added UsePrivateLinkConnection to `New-AzSqlSyncGroup`, `Update-AzSqlSyncGroup`, `New-AzSqlSyncMember` and `Update-AzSqlSyncMember`
* Added SyncMemberAzureDatabaseResourceId to `New-AzSqlSyncMember` and `Update-AzSqlSyncMember`
* Added Guest user lookup support to Set SQL Server Azure Active Directory Admin cmdlet
* Remove IsAzureADOnlyAuthentication parameter from Set-AzSqlServerActiveDirectoryAdministrator as it is not usable.

## Version 2.6.1
* Enhance performance of:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,6 @@ public class SetAzureSqlServerActiveDirectoryAdministrator : AzureSqlServerActiv
[ValidateNotNullOrEmpty()]
public Guid ObjectId { get; set; }

/// <summary>
/// Only Azure Active Directory authentication allowed
/// </summary>
[Parameter(Mandatory = false,
ValueFromPipelineByPropertyName = true,
Position = 4,
HelpMessage = "Specifies if only Azure Active Directory authentication is allowed.")]
[Alias("IsAzureOnlyAuthentication")]
public bool? IsAzureADOnlyAuthentication { get; set; }

/// <summary>
/// Get the entities from the service
/// </summary>
Expand Down Expand Up @@ -107,8 +97,7 @@ protected override IEnumerable<AzureSqlServerActiveDirectoryAdministratorModel>
ResourceGroupName = ResourceGroupName,
ServerName = ServerName,
DisplayName = DisplayName,
ObjectId = ObjectId,
IsAzureADOnlyAuthentication = IsAzureADOnlyAuthentication,
ObjectId = ObjectId
});
return newEntity;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ internal ICollection<AzureSqlServerActiveDirectoryAdministratorModel> ListServer
/// <returns>The upserted Azure SQL Server Active Directory administrator</returns>
internal AzureSqlServerActiveDirectoryAdministratorModel UpsertServerActiveDirectoryAdministrator(string resourceGroup, string serverName, AzureSqlServerActiveDirectoryAdministratorModel model)
{
var resp = Communicator.CreateOrUpdate(resourceGroup, serverName, GetActiveDirectoryInformation(model.DisplayName, model.ObjectId, model.IsAzureADOnlyAuthentication));
var resp = Communicator.CreateOrUpdate(resourceGroup, serverName, GetActiveDirectoryInformation(model.DisplayName, model.ObjectId));

return CreateServerActiveDirectoryAdministratorModelFromResponse(resourceGroup, serverName, resp);
}
Expand Down Expand Up @@ -171,9 +171,8 @@ public static AzureSqlServerActiveDirectoryAdministratorModel CreateServerActive
/// </summary>
/// <param name="displayName">Azure Active Directory user or group display name</param>
/// <param name="objectId">Azure Active Directory user or group object id</param>
/// <param name="isAzureADOnlyAuthentication">Allow only Azure Active Directory authentication</param>
/// <returns></returns>
protected ServerAzureADAdministrator GetActiveDirectoryInformation(string displayName, Guid objectId, bool? isAzureADOnlyAuthentication)
protected ServerAzureADAdministrator GetActiveDirectoryInformation(string displayName, Guid objectId)
{
// Gets the default Tenant id for the subscriptions
Guid tenantId = GetTenantId();
Expand Down Expand Up @@ -248,8 +247,7 @@ protected ServerAzureADAdministrator GetActiveDirectoryInformation(string displa
{
Login = displayName,
Sid = app.ApplicationId,
TenantId = tenantId,
AzureADOnlyAuthentication = isAzureADOnlyAuthentication,
TenantId = tenantId
};
}

Expand All @@ -259,8 +257,7 @@ protected ServerAzureADAdministrator GetActiveDirectoryInformation(string displa
{
Login = group.DisplayName,
Sid = group.Id,
TenantId = tenantId,
AzureADOnlyAuthentication = isAzureADOnlyAuthentication,
TenantId = tenantId
};
}

Expand Down Expand Up @@ -322,8 +319,7 @@ protected ServerAzureADAdministrator GetActiveDirectoryInformation(string displa
{
Login = displayName,
Sid = obj.Id,
TenantId = tenantId,
AzureADOnlyAuthentication = isAzureADOnlyAuthentication,
TenantId = tenantId
};
}
}
Expand Down
21 changes: 3 additions & 18 deletions src/Sql/Sql/help/Set-AzSqlServerActiveDirectoryAdministrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Provisions an Azure AD administrator for SQL Server.
## SYNTAX

```
Set-AzSqlServerActiveDirectoryAdministrator [-DisplayName] <String> [[-ObjectId] <Guid>]
[[-IsAzureADOnlyAuthentication] <Boolean>] [-ServerName] <String> [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-AzSqlServerActiveDirectoryAdministrator [-DisplayName] <String> [[-ObjectId] <Guid>] [-ServerName] <String>
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -98,21 +98,6 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -IsAzureADOnlyAuthentication
Specifies if only Azure Active Directory authentication is allowed.

```yaml
Type: System.Nullable`1[System.Boolean]
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -ObjectId
Specifies the unique ID of the Azure AD administrator that this cmdlet provisions.
If the display name is not unique, you must specify a value for this parameter.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"AssemblyFileName","ClassName","Target","Severity","ProblemId","Description","Remediation"
"Microsoft.Azure.PowerShell.Cmdlets.Sql.dll","Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Cmdlet.SetAzureSqlServerActiveDirectoryAdministrator","Set-AzSqlServerActiveDirectoryAdministrator","0","2000","The cmdlet 'Set-AzSqlServerActiveDirectoryAdministrator' no longer supports the parameter 'IsAzureADOnlyAuthentication' and no alias was found for the original parameter name.","Add the parameter 'IsAzureADOnlyAuthentication' back to the cmdlet 'Set-AzSqlServerActiveDirectoryAdministrator', or add an alias to the original parameter name."
"Microsoft.Azure.PowerShell.Cmdlets.Sql.dll","Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Cmdlet.SetAzureSqlServerActiveDirectoryAdministrator","Set-AzSqlServerActiveDirectoryAdministrator","0","1050","The parameter set '__AllParameterSets' for cmdlet 'Set-AzSqlServerActiveDirectoryAdministrator' has been removed.","Add parameter set '__AllParameterSets' back to cmdlet 'Set-AzSqlServerActiveDirectoryAdministrator'."