---
title: "GET /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}"
method: GET
path: "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}"
tags: ["Departments"]
---

# GET /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}

`GET /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}`

## Request

- Base URL: `https://management.azure.com`
- URL: `https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}`
- Auth: OAuth 2
  - Implicit: `https://login.microsoftonline.com/common/oauth2/authorize`
  - Scopes: `user_impersonation`

Gets a department by ID. The operation is supported only for billing accounts with agreement type Enterprise Agreement.

## Path parameters

- `billingAccountName` string, required
- `departmentName` string, required

## Query parameters

- `api-version` string, required
- `$expand` string
- `$filter` string

## Response `200`

OK. The request has succeeded.

- Department: A department.
  - `id` string: Resource Id.
  - `name` string: Resource name.
  - `type` string: Resource type.
  - `properties` DepartmentProperties: The properties of a department.
    - `departmentName` string: The name of the department.
    - `costCenter` string: The cost center associated with the department.
    - `status` string: The status of the department.
    - `enrollmentAccounts` EnrollmentAccount[]: Associated enrollment accounts. By default this is not populated, unless it's specified in $expand.
      - `id` string: Resource Id.
      - `name` string: Resource name.
      - `type` string: Resource type.
      - `properties` EnrollmentAccountProperties: The properties of an enrollment account.
        - `accountName` string: The name of the enrollment account.
        - `costCenter` string: The cost center associated with the enrollment account.
        - `accountOwner` string: The owner of the enrollment account.
        - `status` string: The status of the enrollment account.
        - `startDate` string, date-time: The start date of the enrollment account.
        - `endDate` string, date-time: The end date of the enrollment account.
        - `department` Department (recursive)

## Other responses

- `default`: Error response describing why the operation failed.

---

[API](https://skmtc.dev/azure/apis/billingmanagementclient.md) - [All operations](https://skmtc.dev/azure/apis/billingmanagementclient/llms.txt) - [OpenAPI document](https://skmtc.dev/azure/apis/billingmanagementclient/revisions/481e7355ac16?raw)
