UNPKG

@pnp/cli-microsoft365

Version:

Manage Microsoft 365 and SharePoint Framework projects on any platform

28 lines 979 B
import { odata } from '../../../../utils/odata.js'; import GraphCommand from '../../../base/GraphCommand.js'; import commands from '../../commands.js'; class EntraLicenseListCommand extends GraphCommand { get name() { return commands.LICENSE_LIST; } get description() { return 'Lists commercial subscriptions that an organization has acquired'; } defaultProperties() { return ['id', 'skuId', 'skuPartNumber']; } async commandAction(logger) { if (this.verbose) { await logger.logToStderr(`Retrieving the commercial subscriptions that an organization has acquired`); } try { const items = await odata.getAllItems(`${this.resource}/v1.0/subscribedSkus`); await logger.log(items); } catch (err) { this.handleRejectedODataJsonPromise(err); } } } export default new EntraLicenseListCommand(); //# sourceMappingURL=license-list.js.map