Default Accounts - Get
Gets the default account information set for the scope.
Get the default account for the scope.
GET https://management.azure.com/providers/Microsoft.Purview/getDefaultAccount?scopeTenantId={scopeTenantId}&scopeType={scopeType}&api-version=2021-12-01
GET https://management.azure.com/providers/Microsoft.Purview/getDefaultAccount?scopeTenantId={scopeTenantId}&scopeType={scopeType}&scope={scope}&api-version=2021-12-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
api-version
|
query | True |
string |
The api version to use. |
scope
|
query | True |
string uuid |
The tenant ID. |
scope
|
query | True |
The scope for the default account. |
|
scope
|
query |
string |
The Id of the scope object, for example if the scope is "Subscription" then it is the ID of that subscription. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Success |
|
Other Status Codes |
An error response received from the provider. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
DefaultAccounts_Get
Sample Request
GET https://management.azure.com/providers/Microsoft.Purview/getDefaultAccount?scopeTenantId=ee85a74c-405e-4adc-bb47-ffa8ca0c9f31&scopeType=Tenant&scope=12345678-1234-1234-1234-12345678abcd&api-version=2021-12-01
Sample Response
Date: Wed, 13 Sep 2017 18:04:32 GMT
x-ms-request-id: d5496da4-9c52-402f-b067-83cc9ddea888
X-Content-Type-Options: nosniff
x-ms-ratelimit-remaining-tenant-reads: 14999
x-ms-correlation-request-id: 25c78f97-0b0a-4fe9-ad39-883a482265cd
{
"scopeTenantId": "12345678-1234-1234-1234-12345678abcd",
"scopeType": "Tenant",
"scope": "12345678-1234-1234-1234-12345678abcd",
"accountName": "myDefaultAccount",
"resourceGroupName": "rg-1",
"subscriptionId": "12345678-1234-1234-1234-12345678aaaa"
}
Definitions
Name | Description |
---|---|
Default |
Payload to get and set the default account in the given scope |
Error |
Gets or sets the error. |
Error |
Default error model |
Error |
Default error response model |
Scope |
The scope for the default account. |
scope |
The scope where the default account is set. |
DefaultAccountPayload
Payload to get and set the default account in the given scope
Name | Type | Description |
---|---|---|
accountName |
string |
The name of the account that is set as the default. |
resourceGroupName |
string |
The resource group name of the account that is set as the default. |
scope |
string |
The scope object ID. For example, sub ID or tenant ID. |
scopeTenantId |
string |
The scope tenant in which the default account is set. |
scopeType |
The scope where the default account is set. |
|
subscriptionId |
string |
The subscription ID of the account that is set as the default. |
Error
Gets or sets the error.
Name | Type | Description |
---|---|---|
code |
string |
Gets or sets the code. |
details |
Gets or sets the details. |
|
message |
string |
Gets or sets the messages. |
target |
string |
Gets or sets the target. |
ErrorModel
Default error model
Name | Type | Description |
---|---|---|
code |
string |
Gets or sets the code. |
details |
Gets or sets the details. |
|
message |
string |
Gets or sets the messages. |
target |
string |
Gets or sets the target. |
ErrorResponseModel
Default error response model
Name | Type | Description |
---|---|---|
error |
Gets or sets the error. |
ScopeType
The scope for the default account.
Name | Type | Description |
---|---|---|
Subscription |
string |
|
Tenant |
string |
scopeType
The scope where the default account is set.
Name | Type | Description |
---|---|---|
Subscription |
string |
|
Tenant |
string |