Azure API Reference

Explore the comprehensive set of APIs available for interacting with Azure services. This documentation provides detailed information on endpoints, parameters, request/response formats, and examples.

Authentication API

Securely authenticate and manage access to Azure resources.

POST /oauth2/token

Obtain an access token by providing valid credentials.

Request Body

{
    "grant_type": "client_credentials",
    "client_id": "YOUR_CLIENT_ID",
    "client_secret": "YOUR_CLIENT_SECRET",
    "scope": "https://management.azure.com/.default"
}

Parameters

Name Type Description Required
grant_type string The grant type for authentication. Typically client_credentials. Yes
client_id string Your Azure AD application client ID. Yes
client_secret string Your Azure AD application client secret. Yes
scope string The scope for the token, e.g., https://management.azure.com/.default. Yes

Example Response (Success)

200 OK
{
    "token_type": "Bearer",
    "expires_in": 3600,
    "ext_expires_in": 3600,
    "access_token": "eyJ0eXAiOiJKV1QiLCJ..."
}

User Management API

Manage users and their permissions within your Azure tenant.

GET /users

Retrieve a list of all users.

Query Parameters

Name Type Description Required
$filter string Filter results (e.g., displayName eq 'John Doe'). No
$top integer Maximum number of results to return. No

Example Response (Success)

200 OK
{
    "value": [
        {
            "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
            "displayName": "Alice Smith",
            "mail": "alice.smith@example.com",
            "userPrincipalName": "alice.smith@contoso.onmicrosoft.com"
        },
        {
            "id": "f0e1d2c3-b4a5-6789-0123-456789abcdef",
            "displayName": "Bob Johnson",
            "mail": "bob.johnson@example.com",
            "userPrincipalName": "bob.johnson@contoso.onmicrosoft.com"
        }
    ]
}

POST /users

Create a new user.

Request Body

{
    "accountEnabled": true,
    "displayName": "New User",
    "mailNickname": "newuser",
    "userPrincipalName": "newuser@contoso.onmicrosoft.com",
    "passwordProfile": {
        "forceChangePasswordNextSignIn": true,
        "password": "AStrongPassword123!"
    }
}

Example Response (Created)

201 Created
{
    "id": "98765432-fedc-ba98-7654-3210fedcba98",
    "displayName": "New User",
    "mail": null,
    "userPrincipalName": "newuser@contoso.onmicrosoft.com",
    "accountEnabled": true
}

Resource Management API

Manage your Azure resources like virtual machines, storage accounts, and more.

GET /subscriptions/{subscriptionId}/resourcegroups

List resource groups in a subscription.

Path Parameters

Name Type Description Required
subscriptionId string The ID of the subscription. Yes

Example Response (Success)

200 OK
{
    "value": [
        {
            "id": "/subscriptions/YOUR_SUBSCRIPTION_ID/resourceGroups/rg-production",
            "name": "rg-production",
            "location": "eastus",
            "properties": {
                "provisioningState": "Succeeded"
            }
        },
        {
            "id": "/subscriptions/YOUR_SUBSCRIPTION_ID/resourceGroups/rg-development",
            "name": "rg-development",
            "location": "westus",
            "properties": {
                "provisioningState": "Succeeded"
            }
        }
    ]
}

Storage Services API

Interact with Azure Blob Storage, File Storage, and Queue Storage.

For detailed storage API operations, please refer to the dedicated Azure Storage API documentation.

Networking API

Manage virtual networks, load balancers, and network security groups.

For detailed networking API operations, please refer to the dedicated Azure Networking API documentation.

Databases API

Manage Azure SQL databases, Cosmos DB, and other database services.

For detailed database API operations, please refer to the dedicated Azure Database API documentation.