Get Account Information

The Get Account Information operation returns the SKU name and account kind for the specified account. It's available on version 2018-03-28 and later versions of the service.

Request

You can construct the Get Account Information request by using a valid request that's authorized through shared key or shared access signature (SAS) authorization.

If you add a restype value of account and a comp value of properties, the request will use the Get Account Information operation. The following table shows examples:

Method Request URI HTTP version
GET/HEAD https://myaccount.blob.core.windows.net/?restype=account&comp=properties HTTP/1.1
GET/HEAD https://myaccount.blob.core.windows.net/?restype=account&comp=properties&sv=myvalidsastoken HTTP/1.1
GET/HEAD https://myaccount.blob.core.windows.net/mycontainer/?restype=account&comp=properties&sv=myvalidsastoken HTTP/1.1
GET/HEAD https://myaccount.blob.core.windows.net/mycontainer/myblob?restype=account&comp=properties&sv=myvalidsastoken HTTP/1.1

URI parameters

You can specify the following additional parameters on the request URI:

Parameter Description
restype Required. The restype parameter value must be account.
comp Required. The comp parameter value must be properties.

Request headers

The following table describes required and optional request headers:

Request header Description
Authorization Required. Specifies the authorization scheme, account name, and signature. For more information, see Authorize requests to Azure Storage.
Date or x-ms-date Required. Specifies the Coordinated Universal Time (UTC) for the request. For more information, see Authorize requests to Azure Storage.
x-ms-version Required for all authorized requests. Specifies the version of the operation to use for this request. For this operation, the version must be 2018-03-28 or later. For more information, see Versioning for the Azure Storage services.
x-ms-client-request-id Optional. Provides a client-generated, opaque value with a 1-kibibyte (KiB) character limit that's recorded in the logs when logging is configured. We highly recommend that you use this header to correlate client-side activities with requests that the server receives.

Request body

None.

Response

The response includes an HTTP status code and a set of response headers.

Status code

A successful operation returns status code 200 (OK).

For information about status codes, see Status and error codes.

Response headers

The response for this operation includes the following headers. The response might also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

Response header Description
x-ms-request-id Uniquely identifies the request that was made. You can use it to troubleshoot the request. For more information, see Troubleshoot API operations.
x-ms-version Version 2009-09-19 and later. Indicates the version of Azure Blob Storage that's used to execute the request.
Date A UTC date/time value that indicates the time at which the service sent the response.
Content-Length Specifies the length of the request body. For this operation, the content length will always be zero.
x-ms-sku-name Identifies the SKU name of the specified account.
x-ms-account-kind Identifies the account kind of the specified account. The possible values are Storage, BlobStorage, and StorageV2. The header distinguishes between General Purpose v1 (GPv1) and General Purpose v2 (GPv2) storage accounts by using the substring V2 for GPv2 accounts.
x-ms-client-request-id Can be used to troubleshoot requests and corresponding responses. The value of this header is equal to the value of the x-ms-client-request-id header, if it's present in the request and the value is at most 1,024 visible ASCII characters. If the x-ms-client-request-id header is not present in the request, this header won't be present in the response.
x-ms-is-hns-enabled Version 2019-07-07 and later. Indicates if the account has a hierarchical namespace enabled.

Response body

None.

Sample response

Response Status:  
HTTP/1.1 200 OK  
  
Response Headers:  
Date: Sat, 28 Mar 2018 12:43:08 GMT  
x-ms-version: 2018-03-28  
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0  
Content-Length: 0  
x-ms-sku-name: Standard_LRS  
x-ms-account-kind: StorageV2  

Authorization

Authorization is required when calling any data access operation in Azure Storage. You can authorize the Get Account Information operation as described below.

Important

Microsoft recommends using Microsoft Entra ID with managed identities to authorize requests to Azure Storage. Microsoft Entra ID provides superior security and ease of use compared to Shared Key authorization.

Azure Storage supports using Microsoft Entra ID to authorize requests to blob data. With Microsoft Entra ID, you can use Azure role-based access control (Azure RBAC) to grant permissions to a security principal. The security principal may be a user, group, application service principal, or Azure managed identity. The security principal is authenticated by Microsoft Entra ID to return an OAuth 2.0 token. The token can then be used to authorize a request against the Blob service.

To learn more about authorization using Microsoft Entra ID, see Authorize access to blobs using Microsoft Entra ID.

Permissions

Listed below is the RBAC action necessary for a Microsoft Entra user, group, managed identity, or service principal to call the Get Account Information operation:

This RBAC action is included in the Owner role, or you can assign this action to a custom role.

To learn more about assigning roles using Azure RBAC, see Assign an Azure role for access to blob data.

Remarks

The URL path of the request does not affect the information that this operation gives. Its purpose is to allow the request to correctly authorize with a SAS token that specifies the allowed resource.

The specified resource does not need to exist for this operation to succeed. For example, a SAS token generated with a nonexistent blob and valid permissions will succeed with a URL path that includes the correct account name, the correct container name, and the nonexistent blob's name.

Billing

Pricing requests can originate from clients that use Blob Storage APIs, either directly through the Blob Storage REST API, or from an Azure Storage client library. These requests accrue charges per transaction. The type of transaction affects how the account is charged. For example, read transactions accrue to a different billing category than write transactions. The following table shows the billing category for Get Account Information requests based on the storage account type:

Operation Storage account type Billing category
Get Account Information Premium block blob
Standard general-purpose v2
Other operations
Get Account Information Standard general-purpose v1 Read operations

To learn about pricing for the specified billing category, see Azure Blob Storage Pricing.