{"id":109,"date":"2019-01-10T22:09:07","date_gmt":"2019-01-11T03:09:07","guid":{"rendered":"http:\/\/itblog.ldlnet.net\/?p=109"},"modified":"2019-01-29T20:12:00","modified_gmt":"2019-01-30T01:12:00","slug":"protected-ad-groups-and-the-problems-they-can-cause-accounts","status":"publish","type":"post","link":"https:\/\/itblog.ldlnet.net\/index.php\/2019\/01\/10\/protected-ad-groups-and-the-problems-they-can-cause-accounts\/","title":{"rendered":"Protected AD Groups and the problems they can cause accounts"},"content":{"rendered":"\n<p>I have run into this issue over the years with accounts being in the Domain Admins group and having issues running PowerShell cmdlets as well as not being able to connect to ActiveSync from a mobile device with the account.<\/p>\n\n\n\n<p>These issues are due to the <em>AdminSDHolder<\/em> Template in AD and the <em>SDProp Process<\/em> that is run every 60 Minutes in AD.<br>This is explained in fantastic detail through the following Microsoft article: <strong><a rel=\"noreferrer noopener\" aria-label=\"Protected&nbsp;Accounts&nbsp;&amp;&nbsp;Groups&nbsp;In&nbsp;Active&nbsp;Directory (opens in a new tab)\" href=\"https:\/\/docs.microsoft.com\/en-us\/windows-server\/identity\/ad-ds\/plan\/security-best-practices\/appendix-c--protected-accounts-and-groups-in-active-directory\" target=\"_blank\">Protected&nbsp;Accounts&nbsp;&amp;&nbsp;Groups&nbsp;In&nbsp;Active&nbsp;Directory<\/a><\/strong><\/p>\n\n\n\n<p>Here is an example of an issue that occurred in one of the environments that I was managing. A user was trying to run the following AD cmdlet in PowerShell on DC01:<\/p>\n\n\n<pre class=\"lang:PowerShell\" title=\"Set-ADUser Cmdlet\">Set-ADUser lancel -Server dc01.ldlnet.org -Replace @{title=\"Senior Operations Engineer\"}<\/pre>\n\n\n\n<p>The user got the following error when the cmdlet was executed:<\/p>\n\n\n\n<p class=\"has-text-color has-small-font-size has-medium-pink-color\">Set-ADUser : Insufficient access rights to perform the operation<br>At line:1 char:1<br>+ Set-ADUser lancel -Server dc01.ldlnet.org -Replace @{title=&#8221;Senior O &#8230;<br>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>+ CategoryInfo: NotSpecified: (lancel:ADUser) [Set-ADUser], ADException<br>+ FullyQualifiedErrorId : ActiveDirectoryServer:8344,Microsoft.ActiveDirectory.Management.Commands.SetADUser<\/p>\n\n\n\n<p>The issue was that the admin account used to run the cmdlet was in the <em>Domain Admins<\/em> group and was not inheriting permissions per the <em>AdminSDHolder<\/em> template that was applied to the account:<\/p>\n\n\n\n<p>I checked to see that the admin account was in a protected group:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"415\" height=\"261\" src=\"http:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/01\/ldladmin-01.png\" alt=\"\" class=\"wp-image-119\" srcset=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/01\/ldladmin-01.png 415w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/01\/ldladmin-01-300x189.png 300w\" sizes=\"auto, (max-width: 415px) 100vw, 415px\" \/><\/figure><\/div>\n\n\n\n<p>I next went to the Security Tab &gt; Advanced Button and saw that the <em>Enable&nbsp;Inheritance&nbsp;<\/em>button was visible:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"767\" height=\"522\" src=\"http:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/01\/ldladmin-2.png\" alt=\"\" class=\"wp-image-113\" srcset=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/01\/ldladmin-2.png 767w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/01\/ldladmin-2-300x204.png 300w\" sizes=\"auto, (max-width: 767px) 100vw, 767px\" \/><figcaption>I&#8217;ve circled where to look in the window.<\/figcaption><\/figure><\/div>\n\n\n\n<p>This verifies that the account is protected due to being in the <em>Domain&nbsp;Admins<\/em> group. Now, there are two workarounds for this particular error that we were experiencing.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Click the <em>Enable&nbsp;Inheritance<\/em> button. This will cause the permissions to be inherited <em><strong>temporarily.<\/strong>&nbsp;<\/em>When SDProp is cycled again, the account will lose any inherited permissions and will be essentially &#8220;broken&#8221; again. This is not good if you&#8217;re going to be running cmdlets regularly to modify AD Accounts.<\/li><li>The preferred method to work around this issue is to set the -Server parameter to point to a different DC than the one you are on. So, essentially, we tell the cmdlet to execute on DC02 when running the cmdlet from DC01.<\/li><\/ol>\n\n\n<pre class=\"lang:PowerShell\" title=\"Workaround when running cmdlet from DC01\">Set-ADUser lancel -Server dc02.ldlnet.org -Replace @{title=\"Senior Operations Engineer\"}<\/pre>\n\n\n\n<p>Either method will allow the cmdlet to execute successfully and modify the object. You would think that Microsoft would have noticed this issue with running an admin cmdlet for Active Directory, but they have not fixed this issue as of yet nor do i think they plan to. I would just go with workaround number two and remain sane.<\/p>\n\n\n\n<p>Another example of this Protected Group issue comes with an account in a Protected Group that has a mailbox not being able to connect to Exchange ActiveSync when setting up their mobile device. <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><em>You usually get a 500 error on the device that you cannot connect. <\/em><\/li><li><em>You will also see event 1053 in Event Viewer alluding to not having sufficient access to create the container for the user in AD. <\/em><\/li><\/ul>\n\n\n\n<p>Read this page for more information:<strong> <\/strong><a rel=\"noreferrer noopener\" href=\"https:\/\/eightwone.com\/2011\/08\/31\/exchange-activesync-and-inheritable-permissions-issue\/\" target=\"_blank\"><strong>Exchange ActiveSync Permissions Issue with Protected Groups<\/strong><\/a><\/p>\n\n\n\n<p>So, in your endeavors admins, keep this in mind when running into these types of problems. Happy Troubleshooting!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have run into this issue over the years with accounts being in the Domain Admins group and having issues running PowerShell<\/p>\n<p class=\"link-more\"><a class=\"myButt \" href=\"https:\/\/itblog.ldlnet.net\/index.php\/2019\/01\/10\/protected-ad-groups-and-the-problems-they-can-cause-accounts\/\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":159,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48,4,2,3,16],"tags":[41,51,52,9,8,50,49],"class_list":["post-109","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-active-directory","category-exchange","category-general","category-powershell","category-windows","tag-active-directory","tag-activesync","tag-adminsdholder","tag-exchange","tag-powershell","tag-protected-groups","tag-sdprop","odd"],"_links":{"self":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts\/109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/comments?post=109"}],"version-history":[{"count":6,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts\/109\/revisions"}],"predecessor-version":[{"id":185,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts\/109\/revisions\/185"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/media\/159"}],"wp:attachment":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/media?parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/categories?post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/tags?post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}