# Count assigned Microsoft 365 licenses by SKU

Counts the Microsoft 365 licenses the M365 sync recorded against contacts, grouped by SKU, for the whole workspace or for one client through its active Microsoft tenant mappings. This is the last sync's data, not a live Microsoft read.

**GET** /v1/m365/licenses



## Parameters
- clientId (query): string

## Request body
No request body.

## Responses
- **200** Count assigned Microsoft 365 licenses by SKU — clientId (required): object; licenses (required): array; totalLicenses (required): integer
- **400** Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description. — ValidationFailedError:; allOf: ErrorEnvelope
- **401** Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description. — UnauthorizedError:; allOf: ErrorEnvelope
- **403** Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description. — ForbiddenError:; allOf: ErrorEnvelope
- **429** Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description. — RateLimitedError:; allOf: ErrorEnvelope
- **503** Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description. — UnavailableError:; allOf: ErrorEnvelope

## Example
```bash
curl --request GET \
  --url 'https://api.scopable.io/v1/m365/licenses' \
  --header 'Authorization: Bearer $SCOPABLE_API_KEY'
```

OpenAPI source: https://api.scopable.io/v1/openapi.json