{"id":12368,"date":"2024-10-17T14:45:06","date_gmt":"2024-10-17T20:45:06","guid":{"rendered":"https:\/\/www.mrc-productivity.com\/techblog\/?post_type=ht_kb&#038;p=12368"},"modified":"2024-10-17T15:06:27","modified_gmt":"2024-10-17T21:06:27","slug":"sync-active-directory-to-menuing","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/techblog\/?ht_kb=sync-active-directory-to-menuing","title":{"rendered":"Sync Active Directory to Menuing"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Introduction<\/h3>\n\n\n\n<p>Many of our clients utilize Microsoft Active Directory to manage users and group access for their organization. <\/p>\n\n\n\n<p>Understandably, some clients don&#8217;t want to have to also manage the same list of users and roles within the m-Power menuing system. <\/p>\n\n\n\n<p>This document will walk you through how to program m-Power to pull data from Active Directory and populate your menuing system.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Global Configuration<\/h3>\n\n\n\n<p>Open your \/mrcjava\/WEB-INF\/classes\/mrc-runtime.properties file and add the following enties:<\/p>\n\n\n\n<p><strong>ad_url<\/strong>=ldap:\/\/ip_goes_here:389;domain=yourcompany.com;search_base=DC=yourcompany,DC=com<br><strong>ad_user_type<\/strong>=SAM<br><strong>ad_user<\/strong>=user@yourcompany.com<br><strong>ad_p<\/strong>=password_goes_here<br><strong>ad_user_table<\/strong>=YOURDD.dbo.MRCSEC1<br><strong>ad_group_table<\/strong>=YOURDD.dbo.MRCSEC6<br><strong>ad_user_group_table<\/strong>=YOURDD.dbo.MRCSEC5<\/p>\n\n\n\n<p>Adjust the ad_url to point at your active directory server. Adjust the domain and DCs accordingly.<\/p>\n\n\n\n<p>Choose either SAM or UPN for ad_user_type. This controls what piece of user information will be written back to the user specific m-Power tables.<\/p>\n\n\n\n<p>Specify the ad_user and ad_p who would have access to the various users and groups from active directory.<\/p>\n\n\n\n<p>For ad_user, ad_group, and ad_user_group, change YOURDD with the data dictionary you would like the data loaded into. You do not need to update the specific table names themselves.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Implementation<\/h3>\n\n\n\n<p>The process to load your active directory data into m-Power is done with an External Object.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Register the External Object<\/h4>\n\n\n\n<p>Register a new external object with the following rules:<\/p>\n\n\n\n<p>Class: com.mrc.ext.ADSync<br>Method: syncADUsers(*DSNAM)<\/p>\n\n\n\n<p>No parameters are required.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/techblog\/images\/adsync1.png\" alt=\"\"\/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Calling the External Object<\/h4>\n\n\n\n<p>Create a maintainer and chose the above external object. Choose the location AFTER ADD.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/techblog\/images\/adsync2.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>After compile, go into Application Properties and set &#8220;skip &#8220;Skip Database Actions&#8221; to Yes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/techblog\/images\/adsync3.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Run the application to trigger the Active Directory syncing process.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Scheduling this Process<\/h4>\n\n\n\n<p>Surely you will not want to manually run this process manually on a daily basis. Instead, you will want to utilize m-Power&#8217;s Messaging &amp; Scheduled Tasks to set this to run on a regular basis.<\/p>\n\n\n\n<p>In Scheduled Tasks, choose &#8220;Call a Maintainer&#8221;<\/p>\n\n\n\n<p>Next, specify the application and add the following into the Additional Maintainer parameters:<\/p>\n\n\n\n<p>one_step=1&amp;action_mode=add&amp;KEYVALUE=1<\/p>\n\n\n\n<p>Replace KEYVALUE with whatever field you used as a dimension in your maintainer.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/techblog\/images\/adsync4.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Once the task is set up, schedule it at the desired interval.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Other Notes<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This feature is available with the Oct 2024 version of m-Power.<\/li>\n\n\n\n<li>While nothing will limit you from using the m-Power interface to manage users and roles, it is advised to avoid doing this. Each time you run the syncing process, all data within MRCSEC1, MRCSEC5, and MRCSEC6 is deleted and repopulated. <\/li>\n\n\n\n<li>You are still encouraged to use the menuing UI to manage application and what roles they are allowed to access.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Many of our clients utilize Microsoft Active Directory to manage users and group access for their organization. Understandably, some clients don&#8217;t want to have to also manage the same list of users and roles within the m-Power menuing system. This document will walk you through how to program m-Power&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[],"ht-kb-tag":[],"class_list":["post-12368","ht_kb","type-ht_kb","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/12368","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12368"}],"version-history":[{"count":2,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/12368\/revisions"}],"predecessor-version":[{"id":12371,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/12368\/revisions\/12371"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12368"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fht-kb-category&post=12368"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fht-kb-tag&post=12368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}