{"id":320,"date":"2009-01-26T19:36:37","date_gmt":"2009-01-26T19:36:37","guid":{"rendered":"https:\/\/www.wapshere.com\/missmiis\/?p=320"},"modified":"2009-11-18T08:38:09","modified_gmt":"2009-11-18T08:38:09","slug":"ilm2-rc0-importing-ad-groups-into-ilm","status":"publish","type":"post","link":"https:\/\/www.wapshere.com\/missmiis\/ilm2-rc0-importing-ad-groups-into-ilm","title":{"rendered":"ILM2 RC0 &#8211; Importing AD groups into ILM"},"content":{"rendered":"<p>I&#8217;d like to be able to manage groups through the Portal but, unlike in the one published walkthrough on <a href=\"http:\/\/technet.microsoft.com\/en-au\/library\/dd239147.aspx\">group management with ILM2<\/a>, I don&#8217;t want to start from scratch. I want to start by importing all the existing groups from AD, and then, well we&#8217;ll see how we go.<\/p>\n<p>Getting information about my AD users into the ILM Portal went well. I just added a bunch of export flow rules to my ILM MA, ran an Export, and voila! all my users were visible in the Portal.<\/p>\n<p>Unfortunately the groups did not go so well. I kept running into the export error <strong>failed-creation-via-web-services<\/strong>, with no idea as to <em>why<\/em>. Eventually I found a post on the <a href=\"https:\/\/connect.microsoft.com\/community\/discussion\/richui\/default.aspx?SiteID=433\">MS Connect newgroup for ILM2<\/a> which pointed me in the right direction (I can&#8217;t link to the post, but if you search for &#8220;<span id=\"ctl00_MasterBody_ArticleBodyPanelSubjectLabel\">failed-via-web-services tips&#8221; you&#8217;ll find it) &#8211; it was to do with the group object schema in the ILM Portal.<!--more--><\/span><\/p>\n<p><span><strong>Checking the schema requirements<\/strong><\/span><\/p>\n<p><span>So what you want to do is find out which attributes are essential for the object type you&#8217;re trying to export, and what restrictions there are on the possible values.<\/span><\/p>\n<ol>\n<li><span>In the ILM Portal, open the <strong>Schema Management<\/strong> page (found under <strong>Administration<\/strong>).<br \/>\n<\/span><\/li>\n<li><span>Click the <strong>All Bindings<\/strong> icon.<br \/>\n<\/span><\/li>\n<li><span>Click on <strong>Advanced Search<\/strong>.<br \/>\n<\/span><\/li>\n<li><span>Enter the search criteria:<\/span>\n<ul>\n<li>The Binding&#8217;s ObjectTypeDescription is Group<\/li>\n<li>Attribute IsRequired is True<\/li>\n<\/ul>\n<p>\u00c2\u00a0<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wapshere.com\/images\/ilm2_schema_group_attribs.jpg\" alt=\"\" \/><\/li>\n<li><span>You should now see a list of the required attributes. You can click on each one to find out more about them. In particular you should check for a regular expression on the Validation tab. Your data must pass the regex (note you can change the regex here if you need to add more possible values).<br \/>\n<\/span><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wapshere.com\/images\/ilm2_schema_group_regex.jpg\" alt=\"\" \/><\/li>\n<\/ol>\n<p>\u00c2\u00a0<br \/>\n<strong>Populating the values<\/strong><\/p>\n<p>Some of the required values, like the display name, you can just flow straight from AD. There are a couple of others you can just flow a constant value to &#8211; though as you don&#8217;t appear to be able to do Advanced rules from the ILM MA you will have to flow the values into the metaverse first from the AD MA.<\/p>\n<p>The Type and Scope will have to be calculated from the groupType attribute in AD, and you will have to set them using the exact terms from the Portal Schema attributes. The following code can be used with advanced import flow rules on the AD MA\u00c2\u00a0(<a href=\"https:\/\/www.wapshere.com\/missmiis\/?p=309\">the classic type<\/a>, which I&#8217;ve gone back to for the time being).<br \/>\n\u00c2\u00a0<\/p>\n<pre> Case \"import_type\"\r\n     If csentry(\"groupType\").IntegerValue &lt; 0 Then\r\n         mventry(\"type\").Value = \"Security\"\r\n     Else\r\n         mventry(\"type\").Value = \"Distribution\"\r\n     End If\r\n\r\n Case \"import_scope\"\r\n     Dim groupScope As Long\r\n     If csentry(\"groupType\").IntegerValue &lt; 0 Then\r\n         groupScope = csentry(\"groupType\").IntegerValue + 2147483648\r\n     Else\r\n         groupScope = csentry(\"groupType\").IntegerValue\r\n     End If\r\n     Select Case groupScope\r\n         Case 2\r\n            mventry(\"scope\").Value = \"Global\"\r\n         Case 4\r\n            mventry(\"scope\").Value = \"DomainLocal\"\r\n         Case 8\r\n            mventry(\"scope\").Value = \"Universal\"\r\n     End Select<\/pre>\n<p>Once the values are all attached to the group objects in the metaverse it is a simple matter to create the export flow rules on the ILM MA.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;d like to be able to manage groups through the Portal but, unlike in the one published walkthrough on group management with ILM2, I don&#8217;t want to start from scratch. I want to start by importing all the existing groups from AD, and then, well we&#8217;ll see how we go. Getting information about my AD&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[22,25],"tags":[],"class_list":["post-320","post","type-post","status-publish","format-standard","hentry","category-groups","category-ilm-2"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pkp1o-5a","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/comments?post=320"}],"version-history":[{"count":9,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/320\/revisions"}],"predecessor-version":[{"id":598,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/320\/revisions\/598"}],"wp:attachment":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/media?parent=320"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/categories?post=320"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/tags?post=320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}