Azure / Azure/azure-cli

Setting SQL Server AD AD Admin is not possible when omitting the displayname parameter

Open
#20,795 4 comments 0 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad customer-reported question Service Attention SQL
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

According to the documentation, the `displayName` parameter of the `az sql server ad-admin create` is optional:

![image](https://user-images.githubusercontent.com/3605786/146973184-04c89c8a-2ee0-40c3-bd93-d3aa997a9545.png)

However, when I execute this command:

```azcli
az sql server ad-admin create --server --resource-group --object-id
```
I'm presented with this error:

```
##[error]ERROR: (InvalidResourceIdSegment) The 'parameters.properties' segment in the url is invalid.
```

When I add the display-name parameter to that command, the command runs and finishes successfully.

I think the documentation must be changed and it must be stated that both the `--object-id` and `--display-name` parameters are mandatory.

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 0bca10a0-5310-1ed6-8391-57a8ccafb27f
* Version Independent ID: 4144f2fa-35f1-533c-e48b-17180f03203e
* Content: [az sql server ad-admin](https://docs.microsoft.com/en-us/cli/azure/sql/server/ad-admin?view=azure-cli-latest)
* Content Source: [latest/docs-ref-autogen/sql/server/ad-admin.yml](https://github.com/MicrosoftDocs/azure-docs-cli/blob/main/latest/docs-ref-autogen/sql/server/ad-admin.yml)
* Service: **sql-database**
* GitHub Login: @rloutlaw
* Microsoft Alias: **routlaw**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.