This rule queries the specified CSV file containing a list of Active Directory or MS365 users and assigns licenses according to the Action section settings.
When to use this rule
Use this rule when you need to enforce Microsoft 365 licenses to the Active directory or Microsoft 365 users that are specified in the CSV file.
This rule requires a source text file in the comma-separated variable format (CSV). You can use the template CSV files provided with the rule, or create a file in Microsoft Excel and export as CSV.
To use a template CSV file:
- In the Query section, click the [...] button next to the Select Data Source setting.
Open the Templates folder.
Depending on the Account source system, select Enforce Office 365 License (Hybrid) or Enforce Office 365 License (Microsoft 365) CSV file.
The Query's source text file requires the following CSV (comma-separated value) format:
Microsoft 365 users:
Select data source
Specifies the text file to be imported.
The […] button allows the user to browse for the file and the Create/Edit button allows the creation or editing of the existing file in the built-in Data Source editor.
If you need to enforce licenses to hybrid users use Enforce Office 365 License (Hybrid) - Template.csv.
If you need to enforce licenses to Microsoft 365 users use Enforce Office 365 License (Microsoft 365) - Template.csv.
Data source anchor attribute
Select a column in the data source that contains the attribute value for identifying and mapping a user like UserPrincipalName.
Account source system
Select the source system of the accounts listed in the CSV file: Hybrid or Microsoft 365.
User anchor attribute
Automap searches for a user using the standard identity attribute DistinduishedName, UserPrincipalName, and ObjectGUID.
Select a custom attribute if your users are identified by a different attribute.
Note: Microsoft best practices assume the Active Directory and Office 365/Azure AD UPNs will match.
Filter CSV data
This setting specifies the filter that can remove data rows from the imported text file that satisfies the specific condition.
Properties to display
To display additional properties for each object found by the query, add those properties to the list.
Filter Office 365 users
To hide unwanted data set the filtering conditions here.
Select which Microsoft 365 licenses and apps/services should be updated for the users:
License's apps and services can be set to Enable, Disable or Ignore.
All other licenses settings mean all other licenses that are not specified in License options. They can be ignored or unassigned.
Change UsageLocation only if not set
Specify whether to keep the current user's usage location or change it to a new one.
Select the usage location.
Important: If Microsoft 365 user accounts don't have a location attribute set, Microsoft 365 license won't be applied 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, have the country set.
If the country that is specified for the Active Directory user account is different from the value of the usage location that is specified in this rule then the Country\region setting will be empty when you open Microsoft 365 License web action for the user. That is to info the administrator that Contry\region is different for Active Directory and Microsoft 365 user accounts.
This section defines the output format of this rule.
To get more information about this section, please see the Output section article.
This section defines the schedule for how often to run the rule.
To get more information about this section, please see the Enforce/Schedule section article.
|The rule has been introduced in the product.