Server Azure AD Administrators - Create Or Update
Skapar eller uppdaterar en befintlig Azure Active Directory-administratör.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/ActiveDirectory?api-version=2025-01-01
URI-parametrar
| Name | I | Obligatorisk | Typ | Description |
|---|---|---|---|---|
|
administrator
|
path | True |
Namnet på server active directory-administratören. |
|
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
Namnet på resursgruppen. Namnet är skiftlägesokänsligt. |
|
server
|
path | True |
string |
Namnet på servern. |
|
subscription
|
path | True |
string (uuid) |
ID för målprenumerationen. Värdet måste vara ett UUID. |
|
api-version
|
query | True |
string minLength: 1 |
Den API-version som ska användas för den här åtgärden. |
Begärandetext
| Name | Obligatorisk | Typ | Description |
|---|---|---|---|
| properties.login | True |
string |
Serveradministratörens inloggningsnamn. |
| properties.sid | True |
string (uuid) |
SID (objekt-ID) för serveradministratören. |
| properties.administratorType |
Typ av administratör för serverservern. |
||
| properties.tenantId |
string (uuid) |
Administratörens klientorganisations-ID. |
Svar
| Name | Typ | Description |
|---|---|---|
| 200 OK |
Resursens 'ServerAzureADAdministrator'-uppdateringsoperation lyckades |
|
| 201 Created |
Resursen 'ServerAzureADAdministrator' skapade operation lyckades Sidhuvuden
|
|
| 202 Accepted |
Resursåtgärden har godkänts. Sidhuvuden
|
|
| Other Status Codes |
Ett oväntat felsvar. |
Säkerhet
azure_auth
Azure Active Directory OAuth2 Flow.
Typ:
oauth2
Flow:
implicit
Auktoriseringswebbadress:
https://login.microsoftonline.com/common/oauth2/authorize
Omfattningar
| Name | Description |
|---|---|
| user_impersonation | personifiera ditt användarkonto |
Exempel
Creates or updates an existing Azure Active Directory administrator.
Exempelbegäran
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory?api-version=2025-01-01
{
"properties": {
"administratorType": "ActiveDirectory",
"login": "bob@contoso.com",
"sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c",
"tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"
}
}
Exempelsvar
{
"name": "ActiveDirectory",
"type": "Microsoft.Sql/servers/administrators",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory",
"properties": {
"administratorType": "ActiveDirectory",
"azureADOnlyAuthentication": true,
"login": "bob@contoso.com",
"sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c",
"tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"
}
}
{
"name": "activeDirectory",
"type": "Microsoft.Sql/servers/administrators",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory",
"properties": {
"administratorType": "ActiveDirectory",
"azureADOnlyAuthentication": true,
"login": "bob@contoso.com",
"sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c",
"tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"
}
}
Definitioner
| Name | Description |
|---|---|
|
Administrator |
|
|
Administrator |
Typ av administratör för serverservern. |
|
created |
Den typ av identitet som skapade resursen. |
|
Error |
Resurshanteringsfelet ytterligare information. |
|
Error |
Detaljerna om felet. |
|
Error |
Felsvar |
|
Server |
Azure Active Directory-administratör. |
|
system |
Metadata som rör skapande och senaste ändring av resursen. |
AdministratorName
| Värde | Description |
|---|---|
| ActiveDirectory |
Active Directory |
AdministratorType
Typ av administratör för serverservern.
| Värde | Description |
|---|---|
| ActiveDirectory |
Active Directory |
createdByType
Den typ av identitet som skapade resursen.
| Värde | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
Resurshanteringsfelet ytterligare information.
| Name | Typ | Description |
|---|---|---|
| info |
object |
Den ytterligare informationen. |
| type |
string |
Typen av ytterligare information. |
ErrorDetail
Detaljerna om felet.
| Name | Typ | Description |
|---|---|---|
| additionalInfo |
Felet ytterligare information. |
|
| code |
string |
Felkoden. |
| details |
Felinformationen. |
|
| message |
string |
Felmeddelandet. |
| target |
string |
Felmålet. |
ErrorResponse
Felsvar
| Name | Typ | Description |
|---|---|---|
| error |
Felet objektet. |
ServerAzureADAdministrator
Azure Active Directory-administratör.
| Name | Typ | Description |
|---|---|---|
| id |
string (arm-id) |
Fullständigt kvalificerat resurs-ID för resursen. T.ex. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
| name |
string |
Namnet på resursen |
| properties.administratorType |
Typ av administratör för serverservern. |
|
| properties.azureADOnlyAuthentication |
boolean |
Azure Active Directory-endast autentisering aktiverad. |
| properties.login |
string |
Serveradministratörens inloggningsnamn. |
| properties.sid |
string (uuid) |
SID (objekt-ID) för serveradministratören. |
| properties.tenantId |
string (uuid) |
Administratörens klientorganisations-ID. |
| systemData |
Azure Resource Manager-metadata som innehåller creationBy och modifiedBy-information. |
|
| type |
string |
Resurstypen. T.ex. "Microsoft. Compute/virtualMachines" eller "Microsoft. Storage/storageAccounts" |
systemData
Metadata som rör skapande och senaste ändring av resursen.
| Name | Typ | Description |
|---|---|---|
| createdAt |
string (date-time) |
Tidsstämpeln för resursskapande (UTC). |
| createdBy |
string |
Identiteten som skapade resursen. |
| createdByType |
Den typ av identitet som skapade resursen. |
|
| lastModifiedAt |
string (date-time) |
Tidsstämpeln för senaste ändring av resurs (UTC) |
| lastModifiedBy |
string |
Identiteten som senast ändrade resursen. |
| lastModifiedByType |
Den typ av identitet som senast ändrade resursen. |