Office 365 Users and Guests Inactive | Suspend Users (Legacy)
IMPORTANT: The legacy Cayosoft Suspend™ configuration will be retired on June 1st, 2026. The legacy configuration will be removed in the product release following the retirement and will be no longer supported. The legacy Suspend rules will remain functional in older versions of Cayosoft Administrator with no support provided by Cayosoft. Migrate to the modern Suspend configuration before the retirement—refer to the following article for additional information on migration: Modern Suspend Configuration.
Rule description
This rule queries Microsoft 365 for different inactivity criteria and suspends inactive users or guests according to current Modern Suspend Configuration.
NOTE: Requires Cayosoft® Suspend™ tool to be installed on the machine running the Cayosoft Administrator Service.
When to use this rule
Use this rule to suspend inactive Microsoft 365 user accounts. You can specify the number of days for the user to be inactive in Microsoft 365 before it is suspended.
Rule settings
Query section
| Setting name | Description |
|---|---|
Query criteria |
Query criteria are sent with the query and may improve query performance. TIP: For additional information on the criteria builder, see the How to use Query Builder dialog for Query Criteria and Filter rule settings. |
User type |
Specify members, guests or both should be suspended. |
Last Microsoft 365 sign in (days ago) |
Specify the number of days since a user's last successful logon of any type (Interactive or Non-Interactive) in the Microsoft 365 environment. Use '0' and remove the lastSuccessfulSignInDays, lastSuccessfulSignInDateTime attributes from the Other Query Settings>Properties to display and System properties settings below to disable this check. Days filter uses the last successful sign in days. NOTE: Using this parameter requires an Azure AD Premium P1/P2 license in the tenant. |
| Last Microsoft 365 service access (days ago) |
Set a minimum number of days past since a user accesses Microsoft 365 services. This queries the dates of the Microsoft activities report and takes the most recent service activity date across all services. |
| Minimum license assignment age (days) | Set a minimum number of days past the license assignment to avoid counting new users as inactive. Use 0 to ignore the license assignment date. |
Other Query Settings | |
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 object list. |
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. |
MSGraph 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.
|
MS Graph advanced queries |
Enables consistency level eventual which uses an index that might not be up-to-date with recent changes to the object. |
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.