MS Entra – Users – Get License From License Items

Estimated reading: 2 minutes

MS Entra – Users – Get License From License Items

Get a user license from a collection of licenses by id.

Action details

PropertyValue
Action labelMS Entra – Users – Get License From License Items
CategoryCloudTools
Apex class and methodGetEntraUserLicenseById.getUserLicenseById
Input typeGetEntraUserLicenseById.GetEntraUserLicenseByIdInput
Output typeList<MSEntraLicenseDetail>
AuthorizationNo 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

InputApex fieldTypeRequiredDescription
IdidStringYesLicense id to find
ItemsitemsList<MSEntraLicenseDetail>YesLicenses to search

Items fields (MSEntraLicenseDetail)

FieldApex fieldTypeRequiredDescription
IdidStringNoLicense detail identifier
Sku IdskuIdStringNoSKU identifier
Sku Part NumberskuPartNumberStringNoSKU part number
Service PlansservicePlansList<MSEntraServicePlanInfo>NoService 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.

OutputApex fieldTypeDescription
IdidStringLicense detail identifier
Sku IdskuIdStringSKU identifier
Sku Part NumberskuPartNumberStringSKU part number
Service PlansservicePlansList<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

SymptomWhat to check
Null matchCheck the collection model and ID. Missing matches are expected null results.

See Entra connector introduction.

Share this Doc

MS Entra – Users – Get License From License Items

Or copy link

CONTENTS

Free eBook: The Ultimate Guide to Power Platform Custom Connectors

Antimanual

Ask our AI support assistant your questions about our platform, features, and services.

You are offline
Chatbot avatar
What can I help you with?

Subscribe

×
Cancel