MS Entra – Users – Get License From License Items
MS Entra – Users – Get License From License Items
Get a user license from a collection of licenses by id.
Action details
| Property | Value |
|---|---|
| Action label | MS Entra – Users – Get License From License Items |
| Category | CloudTools |
| Apex class and method | GetEntraUserLicenseById.getUserLicenseById |
| Input type | GetEntraUserLicenseById.GetEntraUserLicenseByIdInput |
| Output type | List<MSEntraLicenseDetail> |
| Authorization | No connection required; searches existing items. |
Prerequisites and permissions
Pass a previously retrieved collection of the documented model type and the ID to find. This helper performs no callout and needs no Microsoft connector or permissions of its own.
Inputs
| Input | Apex field | Type | Required | Description |
|---|---|---|---|---|
| Id | id | String | Yes | License id to find |
| Items | items | List<MSEntraLicenseDetail> | Yes | Licenses to search |
Items fields (MSEntraLicenseDetail)
| Field | Apex field | Type | Required | Description |
|---|---|---|---|---|
| Id | id | String | No | License detail identifier |
| Sku Id | skuId | String | No | SKU identifier |
| Sku Part Number | skuPartNumber | String | No | SKU part number |
| Service Plans | servicePlans | List<MSEntraServicePlanInfo> | No | Service plans for the SKU |
Outputs
Returns one item per request, in input order. A null request, blank ID, null collection, or missing match yields null. A null or empty request list returns one null element. The first matching non-null item is selected.
| Output | Apex field | Type | Description |
|---|---|---|---|
| Id | id | String | License detail identifier |
| Sku Id | skuId | String | SKU identifier |
| Sku Part Number | skuPartNumber | String | SKU part number |
| Service Plans | servicePlans | List<MSEntraServicePlanInfo> | Service plans for the SKU |
Use in Flow
Use MS Entra – Users – Get License From License Items where supported. Pass a previously retrieved collection and an ID; check the returned item for null.
Use in custom Apex
This subscriber-org example uses the Apptigent namespace. Replace identifiers and example values before use. No callout context is required.
Apptigent.GetEntraUserLicenseById.GetEntraUserLicenseByIdInput request =
new Apptigent.GetEntraUserLicenseById.GetEntraUserLicenseByIdInput();
request.id = 'REPLACE_WITH_ID';
request.items = new List<Apptigent.MSEntraLicenseDetail>{ /* supply previously retrieved items */ };
List<Apptigent.MSEntraLicenseDetail> results =
Apptigent.GetEntraUserLicenseById.getUserLicenseById(
new List<Apptigent.GetEntraUserLicenseById.GetEntraUserLicenseByIdInput>{ request }
);
System.debug(results);
Use in a Lightning Web Component
This collection helper is not exported by msEntraConnectorLib. Search a previously retrieved JavaScript collection with items.find(item => item && item.id === id) || null; this performs no callout. Use the item model expected by the helper rather than a response wrapper.
Error handling and troubleshooting
| Symptom | What to check |
|---|---|
| Null match | Check the collection model and ID. Missing matches are expected null results. |