{"id":4154,"date":"2026-06-08T18:00:49","date_gmt":"2026-06-08T15:00:49","guid":{"rendered":"https:\/\/support.withsecure.com\/en\/?post_type=support_article&#038;p=4154"},"modified":"2026-06-08T18:00:49","modified_gmt":"2026-06-08T15:00:49","slug":"messaging-security-gateway-msg-ldap-import-profile-is-not-removing-users-that-are-no-longer-in-the-active-directory-ad","status":"publish","type":"support_article","link":"https:\/\/support.withsecure.com\/fi\/support-articles\/messaging-security-gateway-msg-ldap-import-profile-is-not-removing-users-that-are-no-longer-in-the-active-directory-ad\/","title":{"rendered":"Messaging Security Gateway (MSG) LDAP import profile is not removing users that are no longer in the Active Directory (AD)"},"content":{"rendered":"<h3>Issue:<\/h3>\n<p>The user repository in the Messaging Security Gateway (MSG) appliance contains a large amount of users that have been imported from Active Directory, but are no longer part of it. Can the appliance automatically remove users from its user repository as they are removed from Active Directory?<\/p>\n<h3>Resolution:<\/h3>\n<p>You can configure the import profile to remove user profiles that are not present in the imported data:<\/p>\n<ol>\n<li>Log in to the MSG web user interface<\/li>\n<li>Select the <b>System<\/b>-tab at the top of the page<\/li>\n<li>Navigate to <b>User Management-&gt;Import\/Auth Profiles<\/b> using the left-hand menu<\/li>\n<li>Click on the LDAP import profile you want to modify<\/li>\n<li>From the window that appears, click on <b>Advanced <\/b>in the top right corner<\/li>\n<li>Under<b> Import Settings<\/b>, set <b>Remove User Profiles Not Imported<\/b> to <b>On<\/b><\/li>\n<li>If you have multiple import profiles, set <b>Add to Group\/Sub-org With Profile Name ()<\/b> to <b>On <\/b>and set <b>Type <\/b>to the preferred option, between <b>Group <\/b>and <b>Sub-Org<\/b>. This is to prevent an import profile to remove users belonging to another profile<\/li>\n<li>Click <b>Save Changes<\/b><\/li>\n<\/ol>\n<p>Next time the import profile is run, any user that isn&#39;t present in the AD will be removed from the MSG user repository. This will be either when the next LDAP import is scheduled, or when the task is run manually (by marking the import profile on the <b>User Management-&gt;Import\/Auth Profiles<\/b>-page using the left-hand side checkbox and clicking <b>Import<\/b>)<\/p>\n<p><b>Note:\u00a0<\/b>the setting\u00a0<b>Remove User Profiles Not Imported<\/b>\u00a0has a value for the maximum amount of users that it will remove at the same time. This is to prevent for example a failed import from deleting the whole user repository. If the actual number of users to be deleted exceeds this limit (default set to 50), the import process might not complete successfully and remove the users. To circumvent this, temporarily change the value for\u00a0<b>Restrict Number Of Profiles To Be Deleted To Less Than\u00a0<\/b>to be greater than the total amount of users in the group that the profile imports to, and run a manual import. You find the setting by following steps 1-5 from above.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The user repository in the Messaging Security Gateway (MSG) appliance contains a large amount of users that have been imported from Active Directory, but are no longer part of it. Can the appliance automatically remove users from its user repository as they are removed from Active Directory?<\/p>\n","protected":false},"template":"","support_article_product":[106],"class_list":["post-4154","support_article","type-support_article","status-publish","hentry"],"acf":{"source_foreign_id":"000005603","source_version":3,"source_system":"salesforce","source_date_updated":"2026-06-08 15:00:49","import_hash":"4af8a63206596bb4ccd4467f6b25fbbb2057b6f9","vanilla_article_id":31180,"vanilla_url":"https:\/\/community.withsecure.com\/en\/kb\/articles\/31180-messaging-security-gateway-msg-ldap-import-profile-is-not-removing-users-that-are-no-longer-in-the-active-directory-ad","vanilla_kb_id":30,"vanilla_category_id":103,"machine_translated":false,"reactions_helpful_yes":0,"reactions_helpful_no":0},"_links":{"self":[{"href":"https:\/\/support.withsecure.com\/fi\/wp-json\/wp\/v2\/support_article\/4154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/support.withsecure.com\/fi\/wp-json\/wp\/v2\/support_article"}],"about":[{"href":"https:\/\/support.withsecure.com\/fi\/wp-json\/wp\/v2\/types\/support_article"}],"wp:attachment":[{"href":"https:\/\/support.withsecure.com\/fi\/wp-json\/wp\/v2\/media?parent=4154"}],"wp:term":[{"taxonomy":"support_article_product","embeddable":true,"href":"https:\/\/support.withsecure.com\/fi\/wp-json\/wp\/v2\/support_article_product?post=4154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}