License State Active Not In Use

Cisco Router: How To Enable The CME-SRST License On Firmware/Code 15.X I had a router today that I needed to make a CME (CallManager Express) phone system. So, I knew I had a license for this already, so I really just needed to activate it. License State: Active, In Use Evaluation total period: 8 weeks 4 days Evaluation period left: 8 weeks.

-->

Full functionality for group-based licensing is available through the Azure portal, and currently PowerShell and Microsoft Graph support is limited to read-only operations. However, there are some useful tasks that can be performed using the existing MSOnline PowerShellcmdlets and Microsoft Graph. This document provides examples of what is possible.

Note

Before you begin running cmdlets, make sure you connect to your organization first, by running the Connect-MsolService cmdlet.

Warning

This code is provided as an example for demonstration purposes. If you intend to use it in your environment, consider testing it first on a small scale, or in a separate test tenant. You may have to adjust the code to meet the specific needs of your environment.

View product licenses assigned to a group

License State: Active Not In Use Eula Not Accepted

The Get-MsolGroup cmdlet can be used to retrieve the group object and check the Licenses property: it lists all product licenses currently assigned to the group.

Output:

Note

The data is limited to product (SKU) information. It is not possible to list the service plans disabled in the license.

Use the following sample to get the same data from Microsoft Graph.

Output:

Get all groups with licenses

You can find all groups with any license assigned by running the following command:

More details can be displayed about what products are assigned:

Output:

Get statistics for groups with licenses

You can report basic statistics for groups with licenses. In the examplebelow, the script lists the total user count, the count of users with licensesalready assigned by the group, and the count of users for whom licensescould not be assigned by the group.

Output:

Get all groups with license errors

To find groups that contain some users for whom licenses could not be assigned:

Output:

Use following to get the same data from Microsoft Graph

Output:

Get all users with license errors in a group

Given a group that contains some license-related errors, you can now list all users affected by those errors. A user can have errors from other groups, too. However, in this example we limit results only to errors relevant to the group in question by checking the ReferencedObjectId property of each IndirectLicenseError entry on the user.

Output:

Use following to get the same data from Microsoft Graph:

Output:

Get all users with license errors in the entire tenant

The following script can be used to get all users who have license errors from one or more groups. The script prints one row per user, per license error, which allows you to clearly identify the source of each error.

Note

This script enumerates all users in the tenant, which might not be optimal for large tenants.

Output:

Here is another version of the script that searches only through groups that contain license errors. It may be more optimized for scenarios where you expect to have few groups with problems.

Check if user license is assigned directly or inherited from a group

For a user object, it is possible to check if a particular product license is assigned from a group or if it is assigned directly.

The two sample functions below can be used to analyze the type of assignment on an individual user:

This script executes those functions on each user in the tenant, using the SKU ID as input - in this example we are interested in the license for Enterprise Mobility + Security, which in our tenant is represented with ID contoso:EMS:

Output:

Graph doesn’t have a straightforward way to show the result, but it can be seen from this API:

Output:

Remove direct licenses for users with group licenses

The purpose of this script is to remove unnecessary direct licenses from users who already inherit the same license from a group; for example, as part of a transitioning to group-based licensing.

Note

It is important to first validate that the direct licenses to be removed do not enable more service functionality than the inherited licenses. Otherwise, removing the direct license may disable access to services and data for users. Currently it is not possible to check via PowerShell which services are enabled via inherited licenses vs direct. In the script, we specify the minimum level of services we know are being inherited from groups and check against that to make sure users do not unexpectedly lose access to services.

Output:

Note

Please update the values for the variables $skuId and $groupId which is being targeted for removal of Direct Licenses as per your test environment before running the above script.

License State Active Not In Use

Next steps

Is My Driver's License Active

To learn more about the feature set for license management through groups, see the following articles: