Office 365 Users | Enforce License Profile rule
Rule description
This Microsoft 365 rule queries the specified scope and assigns the selected license profile for each user that satisfies the criteria.
For more information about license profiles please see License Profiles.
When to use this rule
You can use this rule in the following scenarios:
Enforce license profiles to hybrid users in bulk.
Report about license profiles that are currently assigned to users.
Clear license profiles currently assigned to users and keep existing licenses.
Clear license profiles currently assigned to users and revoke existing licenses.
Reapply currently assigned profiles.
Rule settings
Query section
| Setting name | Description |
|---|---|
General Settings | |
Use previous provision rule results instead of this query |
When used in a runbook, will take the users from the output of certain supported provisioning rule instead of directly through this query section. |
| Limit scope to this Azure AD Administrative Unit |
This setting defines the search query scope. To improve query performance, limit the scope to a specific Entra ID administrative unit. IMPORTANT: To test the rule configuration, limit the rule scope to an administrative unit that contains test accounts or objects. |
| Query criteria | (missing or bad snippet) |
Apply to unlicensed users only |
It is possible to select whether to run the rule for all users or only for those who don't have a license. |
Exclude Office 365 disabled users |
This setting allows to exclude Office 365 disabled users from the rule scope or to include them. |
Include users with this profile |
Specify with which profiles users should be included in the query scope:
|
More options | |
Properties to Display |
Each object property defined in this setting matches the column that will be displayed in the Web Portal for this web query. To display additional columns, add the required properties to the Properties to display list. To add extension attribute 1 that is synchronized from AD, you need to use a value like:
Copy
|
System properties |
List of properties required for this rule to be executed correctly. |
Post-query filter |
To hide unwanted data based on criteria, not supported by the Microsoft 365 query criteria above, set the filtering conditions here. TIP: For optimal performance, use the Query criteria above to filter objects whenever possible. |
Sort by |
Sort result objects list. |
MS Graph query condition (OData) |
By default, Query criteria are used. But when the MS Graph query condition is specified, it overrides the Query criteria setting. See this article for examples: How to use Query Builder dialog for Query Criteria and Filter rule settings. |
Initialization script |
Usually, rules use query criteria to limit the query search scope. It improves the performance of the executed rule. Due to the PowerShell limitations, it is not possible to use calculated expressions in query criteria. That is the point where the initialization script can help. You can initialize a global variable in this setting and then use it in query criteria. IMPORTANT: To use a variable, declared in the initialization script, in the query scope, it must be global: Example: Update AD users, created in the last ten days.
|
|
Limit result set
|
This setting is used to optimize performance by limiting the number of objects returned by the Microsoft Graph API. Unlike query criteria, any post-filters on the returned objects are applied after they are returned, which means that the final set of returned objects could be less than the number configured here despite these objects existing in the source system. |
MS Graph advanced queries |
Enables consistency level eventually which uses an index that might not be up-to-date with recent changes to the object. |
More Options | |
|
Stop rule if errors exceed
|
Too many errors may indicate rule misconfiguration or problems with connectivity. Set this value to some integer value, indicating the number of occurred errors, when the rule execution should stop. |
Exclude shared mailboxes |
Specify if shared mailboxes should be excluded. |
Action section
| Setting name | Description |
|---|---|
| Run mode |
Two options are possible:
|
| License profile |
Select one of the configured license profiles or specify if:
|
| Users with deleted profiles |
Specify what should be done if the license profile should be reapplied but this profile was deleted:
|
| Free selection behavior |
Specify if the license with the Free selection enforcement option should be assigned to a user:
|
| Change Usage Location only if not set | Specify whether to keep the current user's usage location or change it to a new one. |
| Usage Location |
Select the usage location. IMPORTANT: If Microsoft 365 user accounts don't have a location attribute set, Microsoft 36 license won't apply to them, and the rule will stop with the error. If you use Usage Location from AD value for this setting, you must be sure all Active Directory user accounts, that fall under this rule this, have a location attribute set. |
Output Section
This section defines the output format of this rule.
To get more information about this section, please see the Rule Output section article.
Enforce/Schedule Section
This section defines the schedule for how often to run the rule.
To get more information about this section, please see the Rule Enforce/Schedule section article.
Comments
0 comments
Please sign in to leave a comment.