Idira Identity: Configuring Office 365 to exclude AD groups from synchronizing based on the domain name
85
Created On 11/10/26 10:53 AM - Last Modified 11/10/26 13:04 PM
Question
Does Idira Identity provide a method to exclude Active Directory groups from provisioning to Office 365? What options or attributes can be used for filtering group object types to exclude objects from synchronizing?
Environment
Identity App Access Service
Answer
The Idira Identity connector can provide support for both trusted and individual domain configurations. In a 2-way trust configuration, groups from all trusted domains will sync and administrators may wish to prevent provisioning actions. To exclude object types, the provisioning script within the Cloud Manager application can be modified to exclude objects based on a variety of variables such as name, location and domain to name a few available options.
To configure the provisioning script to exclude AD objects from synchronizing :
- In Cloud Manager, go to the Apps page and open your Office 365 application.
- On the Provisioning page, scroll to the Provisioning script section, and click the downward arrow in the heading.
- Modify the provisioning script to exclude an object from synchronization by calling the reject statement.
- For example, if the groups with contoso.com in the mail attribute need to be excluded, the following script can be used:
if (isGroup()) {
trace("CommonName=" + destination.CommonName);
trace("DisplayName=" + destination.DisplayName);
trace("mail=" + destination.Mail);
var mail = String(destination.Mail).toLowerCase();
if (mail.indexOf("@contoso.com")>=0)
{ reject("We are not syncing groups from domain contoso.com"); }
}
Administrators can test the script filtering by configuring Office 365 provisioning for "Preview Mode" (optional) and performing a manual sync. After provisioning is complete and a report is generated, administrators can review the report for events that contain provisioningscript as displayed in the below example for excluding AD groups that contain a domain suffix of contoso.com):
ProvisioningScript: CommonName=Office 365
ProvisioningScript: DisplayName=Office 365
ProvisioningScript: mail=office365@contoso.com
ProvisioningScript: Provisioning script object was rejected. Reason: We are not syncing groups from domain contoso.com
Note: if restriction based on the OU is needed instead, please see following KB article: KB-7482: Office 365 provisioning script to sync users and groups based on the OU they are in
Additional Information
Details
Question:Does Idira Identity provide a method to exclude Active Directory groups from provisioning to Office 365? What options or attributes can be used for filtering group object types to exclude objects from synchronizing?
Answer:
The Idira Identity connector can provide support for both trusted and individual domain configurations. In a 2-way trust configuration, groups from all trusted domains will sync and administrators may wish to prevent provisioning actions. To exclude object types, the provisioning script within the Cloud Manager application can be modified to exclude objects based on a variety of variables such as name, location and domain to name a few available options.
To configure the provisioning script to exclude AD objects from synchronizing :
- In Cloud Manager, go to the Apps page and open your Office 365 application.
- On the Provisioning page, scroll to the Provisioning script section, and click the downward arrow in the heading.
- Modify the provisioning script to exclude an object from synchronization by calling the reject statement.
- For example, if the groups with contoso.com in the mail attribute need to be excluded, the following script can be used:
if (isGroup()) {
trace("CommonName=" + destination.CommonName);
trace("DisplayName=" + destination.DisplayName);
trace("mail=" + destination.Mail);
var mail = String(destination.Mail).toLowerCase();
if (mail.indexOf("@contoso.com")>=0)
{ reject("We are not syncing groups from domain contoso.com"); }
}
trace("CommonName=" + destination.CommonName);
trace("DisplayName=" + destination.DisplayName);
trace("mail=" + destination.Mail);
var mail = String(destination.Mail).toLowerCase();
if (mail.indexOf("@contoso.com")>=0)
{ reject("We are not syncing groups from domain contoso.com"); }
}
Administrators can test the script filtering by configuring Office 365 provisioning for "Preview Mode" (optional) and performing a manual sync. After provisioning is complete and a report is generated, administrators can review the report for events that contain provisioningscript as displayed in the below example for excluding AD groups that contain a domain suffix of contoso.com):
ProvisioningScript: CommonName=Office 365
ProvisioningScript: DisplayName=Office 365
ProvisioningScript: mail=office365@contoso.com
ProvisioningScript: Provisioning script object was rejected. Reason: We are not syncing groups from domain contoso.com
Note: if restriction based on the OU is needed instead, please see following KB article: KB-7482: Office 365 provisioning script to sync users and groups based on the OU they are in