Skip to content

aad user license list

Lists the license details for a given user

Usage

m365 aad user license list [options]

Options

--userId [userId]
The ID of the user. Specify either userId or userName but not both.
--userName [userName]
User principal name of the user. Specify either userId or userName but not both.
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is full.
--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
Output type. json,text,csv,md. Default json
--verbose
Runs command with verbose logging
--debug
Runs command with debug logging

Remarks

Tip

If you don't specify any option, the command will list the license details of the current logged in user. This does not work when using application permissions.

Examples

List license details of the current logged in user.

m365 aad user license list

List license details of a specific user by its UPN.

m365 aad user license list --userName john.doe@contoso.com

List license details of a specific user by its ID.

m365 aad user license list --userId 59f80e08-24b1-41f8-8586-16765fd830d3

Response

[
  {
    "id": "x4s03usaBkSMs5fbAhyttK6cK8RP6rdKlxeBV2I1zKw",
    "skuId": "c42b9cae-ea4f-4ab7-9717-81576235ccac",
    "skuPartNumber": "DEVELOPERPACK_E5",
    "servicePlans": [
      {
        "servicePlanId": "7547a3fe-08ee-4ccb-b430-5077c5041653",
        "servicePlanName": "YAMMER_ENTERPRISE",
        "provisioningStatus": "Success",
        "appliesTo": "User"
      }
    ]
  }
]
id           : x4s03usaBkSMs5fbAhyttK6cK8RP6rdKlxeBV2I1zKw
skuId        : c42b9cae-ea4f-4ab7-9717-81576235ccac
skuPartNumber: DEVELOPERPACK_E5
id,skuId,skuPartNumber
x4s03usaBkSMs5fbAhyttK6cK8RP6rdKlxeBV2I1zKw,c42b9cae-ea4f-4ab7-9717-81576235ccac,DEVELOPERPACK_E5
# aad user license list --userId "0c9c625f-faa9-4c3b-8cd8-d874b869f78c"

Date: 2/19/2023

## x4s03usaBkSMs5fbAhyttK6cK8RP6rdKlxeBV2I1zKw

Property | Value
---------|-------
id | x4s03usaBkSMs5fbAhyttK6cK8RP6rdKlxeBV2I1zKw
skuId | c42b9cae-ea4f-4ab7-9717-81576235ccac
skuPartNumber | DEVELOPERPACK\_E5
servicePlans | [{"servicePlanId":"7547a3fe-08ee-4ccb-b430-5077c5041653","servicePlanName":"YAMMER\_ENTERPRISE","provisioningStatus":"Success","appliesTo":"User"}]