<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Chicken Soup for the Techie</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/abizerh/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/abizerh/feed.xml</link>
    <description />
    <lastBuildDate>Mon, 07 Mar 2016 09:54:56 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Possible causes of Authentications failures for federated users in Office 365.</title>
      <link>https://docs.microsoft.com/archive/blogs/abizerh/possible-causes-of-authentications-failures-for-federated-users-in-office-365</link>
      <pubDate>Mon, 01 Jun 2015 14:31:00 GMT</pubDate>
      <dc:creator><![CDATA[Abizer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/abizerh/2013/04/20/possible-causes-of-authentications-failures-for-federated-users-in-office-365/</guid>
      <description><![CDATA[Here I&rsquo;m assuming that we are using ADFS, for SSO to O365 services:
Below I have tried to...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family:times new roman,times;"><em><span style="font-size:medium;">Here I&rsquo;m assuming that we are using ADFS, for SSO to O365 services:</span></em></span></p>
<p><em><span style="font-family:Times New Roman;font-size:medium;">Below I have tried to list, a flow&nbsp;for Troubleshooting, authentication issues for a federated user in Azure AD / O365</span></em></p>
<p><span style="font-family:Times New Roman;font-size:medium;"><br /></span><span style="font-family:times new roman,times;font-size:medium;"><strong>1.&nbsp;</strong>&nbsp; Access <a href="https://login.microsoftonline.com/"><span style="color:#0000ff;">https://login.microsoftonline.com/</span></a> and in the Login Form, enter the federated user&rsquo;s login name like <a href="mailto:someone@example.com"><span style="color:#0000ff;">someone@example.com</span></a>, once you hit tab to focus out of the login textbox, check if the statue of the page changes to redirecting and it redirect you to your STS / ADFS for sign-in. </span></p>
<p><span style="font-family:times new roman,times;font-size:medium;"><span>&nbsp;</span></span></p>
<ol>
<li style="list-style-type:none;"><ol>
<li><span style="font-family:times new roman,times;font-size:medium;">If no redirection happens and you get the option to enter password on the same page, then it means that Azure AD does not recognize the user or the domain of the user to be Federated.</span></li>
</ol></li>
</ol><ol><ol><ol>
<li>
<p><span style="font-family:times new roman,times;font-size:medium;">This is when you check if there is a federation trust between Azure AD / O365 and your STS/ADFS.</span></p>
</li>
</ol></ol></ol>
<p style="margin-left:120px;"><span style="font-family:times new roman,times;font-size:medium;">Run &lsquo;Get-msoldomain&rsquo; cmdlet from Azure AD powershell, to find out if the domain is managed or federated.&nbsp;</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;"><br /></span>b.&nbsp;&nbsp;<span style="font-family:times new roman,times;font-size:medium;"> If you see Redirection happening but it does NOT take you to your STS / ADFS for sign-in, then check if the STS / ADFS service name is resolving to the correct IP and if it can connect to that IP on TCP port 443.</span></p>
<p style="margin-left:120px;"><span style="font-family:times new roman,times;font-size:medium;"></span></p>
<p style="margin-left:120px;"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;">If it shows federated, then get information about the federation trust by running the below commands.</span></p>
<p style="margin-left:240px;"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;"></span></p>
<p style="margin-left:120px;"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;"><code>Get-MsolFederationProperty -DomainName &lt;domain&gt;</code></span></p>
<p style="margin-left:240px;"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;"></span></p>
<p style="margin-left:120px;"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;"><code>Get-MsolDomainFederati</code><code>onSettings -DomainName &lt;string&gt;</code></span></p>
<p style="margin-left:240px;"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;"></span></p>
<p style="margin-left:120px;"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;">**check the URI, URL and Certificate of the federation partner configured with AzureAD.</span></p>
<p style="margin-left:120px;"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;">&nbsp;</span></p>
<p><strong><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;">2. After you get redirected to ADFS, the browser may throws a certificate trust related error, and for some client/devices it may not let you establish a SSL session with ADFS.</span></strong></p>
<p style="margin-left:60px;"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;">- Esnure that ADFS service communication certificate presented to the client is the same and one configured on ADFS</span></p>
<p style="margin-left:60px;"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;">- Ensure that ADFS service communication certificate is trusted by the client.</span></p>
<p style="margin-left:60px;"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;">- If Non-SNI capable client are trying to establish a SSL session with ADFS/WAP 2-12 R2, it may fail. Please consider adding a Fallback entry on the ADFS/WAP servers to support non-SNI clients.</span></p>
<p style="margin-left:60px;"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;"></span></p>
<p style="margin-left:90px;"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;">How to support non-SNI capable Clients with Web Application Proxy and AD FS 2012 R2</span><br /><a href="/b/applicationproxyblog/archive/2014/06/19/how-to-support-non-sni-capable-clients-with-web-application-proxy-and-ad-fs-2012-r2.aspx" target="_blank"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;">https://blogs.technet.com/b/applicationproxyblog/archive/2014/06/19/how-to-support-non-sni-capable-clients-with-web-application-proxy-and-ad-fs-2012-r2.asp</span>x</a>&nbsp;</p>
<p style="margin-left:60px;"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;"><strong>&nbsp;3. &nbsp;&ldquo;Unknown Auth method&rdquo; or Errors stating AuthnCOntext not supported Errors at ADFS / STS level when you are redirected from Office 365.</strong></span></p>
<p style="margin-left:30px;"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;">This is most common when Office 365 and Azure AD redirects to&nbsp;the&nbsp;ADFS/STS with parameter enforcing a authentication method.</span></p>
<p style="margin-left:30px;"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;">WSFED - uses WAUTH query string to force an preferred authentication method.</span></p>
<p style="margin-left:30px;"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;">SAML2.0 - uses the following</span></p>
<p style="margin-left:60px;"><br /><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;">&lt;saml:AuthnContext&gt;</span><br /><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;"> &lt;saml:AuthnContextClassRef&gt;</span><br /><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;"> urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</span><br /><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;"> &lt;/saml:AuthnContextClassRef&gt;</span><br /><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;"> &lt;/saml:AuthnContext&gt;</span></p>
<p style="margin-left:30px;"><span style="font-family:&#39;times new roman&#39;, times;font-size:medium;">**When the enforced Authentication method is sent with a wrong value or that authentication method is not supported on &nbsp;ADFS/ STS, it will give you an error before authenticating you.</span></p>
<p style="margin-left:30px;"><strong><span>&nbsp;</span></strong></p>
<p><span style="font-family:times new roman,times;font-size:medium;"><strong>4.&nbsp;&nbsp; After you get to your STS / ADFS and enter you credential but you are NOT able to authenticate, check the following: </strong></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;"><strong><span>a.&nbsp;&nbsp; Active Directory replication issue</span></strong></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">If AD replication is broken, changes made to user/group may not be in sync across DCs. Between DCs, we may have password/upn/groupmembersip/proxyaddress mismatch that will affect the ADFS response (authentication and claims), as it may go to different DCs for Authentication and LDAP query.</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">One should start looking at the DCs in the same site as ADFS, probably a &lsquo;Repadmin /showreps&rsquo; or a &lsquo;DCdiag /v&rsquo; should tell if there is a problem on the DCs, ADFS is most likely to contact.</span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><span>We can also collect AD replication summary to ensure that AD changes are getting replicated across to all DCs correctly. I have found &ldquo;repadmin /showrepl * /csv &gt; showrepl.csv&rdquo; output to be helpful.</span></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">&nbsp;</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;"><strong><span>b.&nbsp;&nbsp; Account locked out or disabled in Active Directory.</span></strong></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">When getting authenticated via ADFS, the end user is not going to get an error stating that the account is locked or disabled.</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">With the ADFS auditing or Audit logon events enabled &ndash; we should be able to find if the authentication failed due to incorrect password, account disabled /locked etc.</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">Enable ADFS and Logon auditing on the ADFS servers.</span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><span>1.&nbsp;&nbsp;&nbsp;&nbsp; Use local or domain policy to enable Success and failure for</span></span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><span>o&nbsp;&nbsp;&nbsp; Computer configuration\Windows Settings\Security setting\Local Policy\Audit Policy</span></span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><span>-&nbsp; Audit logon event</span></span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><span>-&nbsp; Audit Object Access</span></span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><span>2.&nbsp;&nbsp;&nbsp;&nbsp; Disable the following policy</span></span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><span>o&nbsp;&nbsp;&nbsp; Computer configuration\Windows Settings\Security setting\Local Policy\Security Option &ndash; &ldquo;Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings.&rdquo; &ndash; Disabled</span></span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> &nbsp;&nbsp;<br /> </span><span>If you want to configure this via advanced auditing, then follow the steps in the link below:</span></span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><a href="https://technet.microsoft.com/en-us/library/adfs2-troubleshooting-configuring-computers(v=WS.10).aspx#bkmk_ConfigureAuditing"><span style="color:#0000ff;">https://technet.microsoft.com/en-us/library/adfs2-troubleshooting-configuring-computers(v=WS.10).aspx#bkmk_ConfigureAuditing</span></a></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">3.&nbsp;&nbsp;&nbsp;&nbsp; Configure ADFS for auditing:</span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><span>o&nbsp;&nbsp;&nbsp; Open the AD FS 2.0 Management snap-in.</span></span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><span>To open the AD FS 2.0 Management snap-in, click Start, point to Programs, point to Administrative Tools, and then click AD FS 2.0 Management.</span></span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><span>o&nbsp;&nbsp;&nbsp; In the Actions pane, click Edit Federation Service Properties.</span></span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><span>o&nbsp;&nbsp;&nbsp; In the Federation Service Properties dialog box, click the Events tab.</span></span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><span>o&nbsp;&nbsp;&nbsp; Select the Success audits and Failure audits check boxes</span></span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><span>4.&nbsp;&nbsp;&nbsp;&nbsp; Run &lsquo;Gpupdate /force&rsquo; on the server</span></span></p>
<p><span style="font-family:times new roman,times;font-size:medium;">&nbsp;</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;"><strong><span>c.&nbsp;&nbsp; SPN registered incorrectly</span></strong></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">Duplicate SPN or SPN registered under the an account other than the ADFS service account.</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">Ensure that SPN HOST/ADFSservicename is added under the Service account running the ADFS service, in an ADFS Farm setup. For ADFS standalone setup, where the service is running under the &lsquo;Network Service&rsquo;, the SPN need to be under the server computer account, hosting ADFS.</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">Ensure that there are not Duplicate&nbsp; SPNs for the ADFS service, as it may cause intermittent authentication failure with ADFS.</span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><span>Use &lsquo;SETSPN &ndash;L serviceaccount&rsquo; to list the SPN, </span></span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><span>&lsquo;SETSPN &ndash;A HOST/ADFSservicename serviceaccount&rsquo; to Add the SPN </span></span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><span>and &lsquo;SETSPN &ndash;X -F&rsquo; to check for duplicate SPN.</span></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">&nbsp;</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;"><strong><span>d.&nbsp;&nbsp; Duplicate UPNs in AD.</span></strong></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">One time I came across an issue where we were able to authenticate via ADFS when using SAMAccountName but failed when using UPN. We eventually found that users were failing to authenticate using UPN because the AD had 2 users with the same UPN. It&rsquo;s possible to end up with 2 users with the same UPN when users are added and modified using scripting, ADSIedit etc.</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">In the above scenario, when using UPN the user was getting authenticated against the duplicate user, hence the credential supplied were not getting validated.</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">You can use queries like below to check if there are multiple objects in AD with same values for an attribute.</span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><span>&ldquo;Dsquery * forestroot -filter UserPrincipalName=problemuser_UPN&ldquo;</span></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">Make sure that the UPN on the duplicate user is renamed, so that authentication request with the UPN get validated against the correct Objects.</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">&nbsp;</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;"><strong>e.&nbsp;&nbsp; </strong>In a scenario, where you are using your email as the login ID on O365 and entering the same Email address when being redirected to ADFS for authenticate. The authentication may fail with NO_SUCH_USER error in Audit logs. For you to enable ADFS to find a user for authentication using an Attribute other than UPN or SAMaccountname, like Email, you need to configure it to support Alternate Logon ID.</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;"><strong><span>Configuring Alternate Login ID</span></strong></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;"><strong><a href="https://technet.microsoft.com/en-us/library/dn659436.aspx"><span style="color:#0000ff;">https://technet.microsoft.com/en-us/library/dn659436.aspx</span></a><span> </span></strong></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">&nbsp;</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;"><strong><span>f.&nbsp;&nbsp; ADFS service account does not have READ access to on the ADFS token signing certificate&rsquo;s private key.</span></strong></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">a. When you add a new Token-Signing certificate, you receive a warning reading: &quot;Ensure that the private key for the chosen certificate is accessible to the service account for this Federation Service on each server in the farm&quot;:<br /> b. Click Start, Run, type MMC.exe, and press Enter<br /> c. Click File, Add/Remove Snap-in<br /> d. Double-click Certificates<br /> e. Select Computer account and click Next<br /> f. Select Local computer and click Finish<br /> g. Expand Certificates (Local Computer), expand&nbsp; Personal, and select Certificates<br /> h. Right-click your new Token-Signing certificate, select All Tasks, and select Manage Private Keys<br /> i. Add Read access for your AD FS 2.0 service account and click OK<br /> j. Close the Certificates MMC</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;"><strong><span>&nbsp;</span></strong></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;"><strong><span>g.&nbsp; &nbsp;&ldquo;Extended Protection&rdquo; for Windows Authentication is enabled for ADFS/LS &ndash; may cause issues with specific browsers</span></strong></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">At times you may see ADFS repeatedly prompting for credentials, this could be related to &ldquo;Extended protection&rdquo; that is enabled for Windows Authentication for the ADFS/LS application, in IIS</span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><span>When Extended Protection for Authentication is enabled, authentication requests are bound to both the Service Principal Names (SPN) of the server to which the client tries to connect and to the outer Transport Layer Security (TLS) channel over which Integrated Windows Authentication happens. Extended protection enhances the existing Windows Authentication functionality to mitigate authentication relay or &quot;man in the middle&quot; attacks. Certain browsers/fiddler cannot work with &ldquo;Extended protection&rdquo;, it would throw repeated prompts followed by access denied. Disabling &ldquo;Extended protection&rdquo; helps is such scenario.</span></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">Browser Issues with Extended Protection for Authentication</span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><a href="https://technet.microsoft.com/en-us/library/hh852537.aspx"><span style="color:#0000ff;">https://technet.microsoft.com/en-us/library/hh852537.aspx</span></a></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">AD FS 2.0: Continuously Prompted for Credentials While Using Fiddler Web Debugger</span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><a href="https://social.technet.microsoft.com/wiki/contents/articles/1426.ad-fs-2-0-continuously-prompted-for-credentials-while-using-fiddler-web-debugger.aspx"><span style="color:#0000ff;">https://social.technet.microsoft.com/wiki/contents/articles/1426.ad-fs-2-0-continuously-prompted-for-credentials-while-using-fiddler-web-debugger.aspx</span></a></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">&nbsp;</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;"><strong><span>h.&nbsp;&nbsp; Issuance Authorization claims rules in RP, denying access to user.</span></strong></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">On the ADFS Relying party Trust, you can configure the Issuance Authorization rules that can be used to control whether an authenticated user should be issued a token for an Relying Party. We can use the claims issued to this user to make that decision like DENY access to a user if he is a part of a group (group being pulled up as a claim).</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">If certain federated user are unable to get through via ADFS, you may want to check the &ldquo;Issuance Authorization rules&rdquo; for the Office 365 RP and check if it has &lsquo;PERMIT All&rsquo;. If not, go through the custom authorization rules to check if the condition in that rule will evaluate true for the affected user.</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">Limiting Access to Office 365 Services Based on the Location of the Client</span><br /><span style="font-family:times new roman,times;font-size:medium;"><a href="https://technet.microsoft.com/en-us/library/hh526961(v=ws.10).aspx"><span> </span><span style="color:#0000ff;">https://technet.microsoft.com/en-us/library/hh526961(v=ws.10).aspx</span></a>&nbsp;-- for ADFS 2.0</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;"><span style="color:#0000ff;"><a href="https://technet.microsoft.com/en-in/library/dn592182.aspx" target="_blank">https://technet.microsoft.com/en-in/library/dn592182.aspx</a> -- <span style="color:#000000;">for ADFS 2012 r2/WAP</span></span></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;"><span style="color:#0000ff;">&nbsp;</span></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">Understanding Claim Rule Language in AD FS 2.0</span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><a href="https://social.technet.microsoft.com/wiki/contents/articles/4792.understanding-claim-rule-language-in-ad-fs-2-0.aspx"><span style="color:#0000ff;">https://social.technet.microsoft.com/wiki/contents/articles/4792.understanding-claim-rule-language-in-ad-fs-2-0.aspx</span></a></span></p>
<p><span style="font-family:times new roman,times;font-size:medium;"><strong><span>&nbsp;</span></strong></span></p>
<p><strong><span style="font-size:medium;">5</span>.&nbsp;&nbsp; <span style="font-family:times new roman,times;font-size:medium;">If you, are able to authenticate from Intranet when talking to the ADFS server directly but FAIL when accessing ADFS via ADFS proxy, check the following: </span></strong></p>
<p><strong><span style="font-size:medium;">&nbsp;</span></strong><span style="font-family:times new roman,times;font-size:medium;"></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">a.&nbsp; &nbsp;<strong>Time sync issue on ADFS server and ADFS proxy</strong></span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">Ensure that the time on the ADFS server and the proxy is in sync, when the time on ADFS server is off by more than 5 minutes, from that on the DCs, we get authentication failures. When the time on ADFS proxy is off sync as compared to ADFS, the proxy trust would get affected and broken, which will start failing the request coming via the ADFS proxy.</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">&nbsp;</span></p>
<p style="margin-left:60px;"><span style="font-family:times new roman,times;font-size:medium;">b. <strong>Check if the ADFS proxy Trust with the ADFS service is working fine</strong>. Re-running the proxy configuration may be a good option if you doubt that the proxy trust is broken.</span></p>
<p><span style="font-family:times new roman,times;font-size:medium;">&nbsp;</span></p>
<p><span style="font-size:medium;"><span><strong>&nbsp;6</strong>.&nbsp;&nbsp; </span><b>After your STS / ADFS issues a Token, Azure AD / O365 throws an error.</b></span></p>
<p><strong><span style="font-family:Times New Roman;font-size:medium;">&nbsp;</span></strong></p>
<p style="margin-left:60px;"><strong><span style="font-family:times new roman,times;font-size:medium;">a.&nbsp;&nbsp; The Claims Issued by ADFS / STS in Token, should match the respective Attributes of the user in Azure AD.</span></strong></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;"><span>In the Token for Azure AD / O365, we need the following Claims:</span></span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;"><span style="text-decoration:underline;"><span>&nbsp;</span></span></span></p>
<p style="margin-left:90px;"><strong><span style="font-family:times new roman,times;font-size:medium;"><span style="text-decoration:underline;">WSFED</span>: </span></strong></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;">UPN = the value of this claim should match the userprincipalname of the users in Azure AD.</span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;">ImmutableID = the value of this claim should match the sourceAnchor or ImmutableID of the user in Azure AD.</span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;"><span>To get User attribute value in Azure AD, run Get-MsolUser &ndash;UserPrincipalName &lt;UPN&gt;</span></span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;"><span style="text-decoration:underline;"><span>&nbsp;</span></span></span></p>
<p style="margin-left:90px;"><strong><span style="font-family:times new roman,times;font-size:medium;"><span style="text-decoration:underline;">SAML 2.0:</span></span></strong></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;">IDPEmail = the value of this claim should match the userprincipalname of the users in Azure AD.</span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;">NAMEID = the value of this claim should match the sourceAnchor or ImmutableID of the user in Azure AD.</span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;">&nbsp;</span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;">Use a SAML 2.0 identity provider to implement single sign-on</span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;"><a href="https://technet.microsoft.com/en-us/library/dn641269.aspx"><span style="color:#0000ff;">https://technet.microsoft.com/en-us/library/dn641269.aspx</span></a><span> </span></span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;">&nbsp;</span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;"><i><span>Examples:</span></i></span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;">One common cause leading to this issue is when the UPN of a synced user is changed in AD without updating the online directory. Here one can either correct the User&rsquo;s UPN in AD, to match the related user&rsquo;s logon name or change the Logon name of the related user in the Online directory, using cmdlet -&nbsp; &ldquo;Set-MsolUserPrincipalName -UserPrincipalName [ExistingUPN] -NewUserPrincipalName [DomainUPN-AD]&rdquo;</span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;">&nbsp;</span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;">It might also be that you are using AADsync to sync &lsquo;MAIL as UPN&rsquo; and &lsquo;EMPID as SourceAnchor&rsquo;, but the Relying Party claim rules at ADFS level have not been updated to send &lsquo;MAIL as UPN&rsquo; and &lsquo;EMPID as ImmutableID&rsquo;</span></p>
<p><span style="font-family:times new roman,times;font-size:medium;">&nbsp;</span></p>
<p style="margin-left:60px;"><strong><span style="font-family:times new roman,times;font-size:medium;">b.&nbsp; Token signing certificate mismatch between ADFS and Office 365.</span></strong></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;">This is one of the most common issues. ADFS uses the Token signing certificate to sign the Token sent to the user or application. The trust between the ADFS and O365 is a federated trust based on this token signing certificate, i.e. Office 365 verifies that the Token received is signed using a token-signing certificate of the claim provider (ADFS service) it trust.</span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;">Now when the Token signing certificate on the ADFS is changed as a result of Auto Certificate Rollover or Admins intervention (after or before certificate expiry), then the details of the new certificate needs to be updated on the O365 tenant for the federated domain, which may not happen automatically and requires Admin intervention.</span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;">While in a broken state when the Primary Token signing certificate on the ADFS is different than what O365 knows about, the Token issued by ADFS is not trusted by O365 and hence the federated user is not allowed to logon.</span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;">We can use &lsquo;Get-MsolFederationProperty -DomainName &lt;domain&gt;&rsquo;&nbsp; to dump the federation property on ADFS and O365. Here you can compare the TokenSigningCertificate thumbprint, to check if O365 tenant configuration for your federated domain is in sync with ADFS. If you find a mismatch in the Token-Signing certificate configuration, use the following command to update it, &ldquo;Update-MsolFederatedDomain -DomainName &lt;domain&gt; -SupportMultipleDomain&rdquo;</span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;">You can also run the below tool to schedule a task on the ADFS server that will monitor for the Auto-certificate rollover, of the Token signing certificate and update O365 tenant automatically.</span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;">&nbsp;</span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;">Microsoft Office 365 Federation Metadata Update Automation Installation Tool</span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><a href="https://gallery.technet.microsoft.com/scriptcenter/Office-365-Federation-27410bdc"><span style="color:#0000ff;">https://gallery.technet.microsoft.com/scriptcenter/Office-365-Federation-27410bdc</span></a></span></p>
<p style="margin-left:90px;"><span style="font-family:times new roman,times;font-size:medium;">Verify and manage single sign-on with AD FS</span><br /><span style="font-family:times new roman,times;font-size:medium;"><span> </span><a href="https://technet.microsoft.com/en-us/library/jj151809.aspx"><span style="color:#0000ff;">https://technet.microsoft.com/en-us/library/jj151809.aspx</span></a></span></p>
<p><span style="font-family:Times New Roman;font-size:medium;">&nbsp;</span></p>
<p style="margin-left:60px;"><span style="font-family:Times New Roman;font-size:medium;"><strong>c.&nbsp;</strong>&nbsp; &nbsp;</span><span style="font-family:times new roman,times;font-size:medium;"><strong>&ldquo;Issuance Transform claim&rdquo; rules for the Office 365 RP not configured correctly, in a scenarios where you have multiple TLD (Top level domain).&nbsp; </strong>You might have issues login in if &lsquo;Supportmultipledomain&rsquo; switch was not used when creating and updating RP trust with O365</span></p>
<p style="margin-left:90px;"><span style="font-size:medium;">SupportMultipleDomain switch, when managing SSO to Office 365</span><br /><span style="font-family:Times New Roman;font-size:medium;"> </span><span style="color:#0000ff;font-size:medium;"><a href="/b/abizerh/archive/2013/02/06/supportmultipledomain-switch-when-managing-sso-to-office-365.aspx">https://blogs.technet.com/b/abizerh/archive/2013/02/06/supportmultipledomain-switch-when-managing-sso-to-office-365.aspx</a></span></p>
<p><span style="font-family:Times New Roman;font-size:medium;">&nbsp;</span></p>
<p style="margin-left:60px;"><strong><span style="font-family:Times New Roman;font-size:medium;">d. &nbsp;Ensure Token Encryption is NOT being used by ADFS or STS when issuing a Token to AzureAD or O365.</span></strong></p>
<p style="margin-left:60px;"><span style="font-family:Times New Roman;font-size:medium;">&nbsp;</span></p>
<p><strong><span style="font-size:medium;">7.&nbsp;&nbsp; Stale cached credentials in Windows Credential Manager</span></strong></p>
<p><span style="font-size:medium;">At times when login in from a workstation to the portal or using outlook, when being prompted for credentials, we might have selected save credentials/password, which in turn may have saved the credentials for the target (O365 or ADFS service), in the Windows Credentials manager (Control Panel\User Accounts\Credential Manager). This should help prevent credentials prompt for some time, but may cause a problem after the user password has changed and the credentials manager is not updated. Then you always end up sending the stale credentials to the ADFS service and fail to authenticate.</span></p>
<p><span style="font-size:medium;">Removing or updating the cached credentials, in Windows Credential Manager may help.</span></p>
<p><span style="font-family:Times New Roman;font-size:medium;">&nbsp;</span></p>
<p><strong><span style="font-family:Times New Roman;font-size:medium;">8. Ensure that&nbsp;Secure Hash Algorithm configured on the Relying Party Trust for O365 &nbsp;is set to SHA1</span></strong></p>
<p style="margin-left:30px;"><span style="font-family:Times New Roman;font-size:medium;">When the trust between the STS/ADFS and AzureAD/O365 is using SAML 2.0 protocol, the&nbsp;Secure Hash Algorithm configured&nbsp;&nbsp;for digital signature should be SHA1.</span></p>
<p style="margin-left:30px;"></p>
<p><strong><span style="font-size:medium;">6.&nbsp; &nbsp;Lastly if none of the above causes are true, then create a support case with Microsoft and ask them to check if the User account shows consistent under the O365 tenant.</span></strong></p>
<p><span style="font-family:Times New Roman;font-size:medium;">&nbsp;&nbsp;</span></p>
<p><span style="text-decoration:underline;"><span style="font-size:medium;">More info</span></span></p>
<p><span style="font-family:Times New Roman;font-size:medium;">&nbsp;</span></p>
<p><span style="font-size:medium;">Error message from AD FS 2.0 when a federated user signs in to Office 365: &quot;There was a problem accessing the site&quot;</span><br /><span style="font-family:Times New Roman;font-size:medium;"> </span><a href="https://support.microsoft.com/kb/2383983/EN-US"><span style="color:#0000ff;font-size:medium;">https://support.microsoft.com/kb/2383983/EN-US</span></a></p>
<p><span style="font-family:Times New Roman;font-size:medium;">&nbsp;</span></p>
<p><span style="font-size:medium;">A federated user is repeatedly prompted for credentials when he or she connects to the AD FS 2.0 service endpoint during Office 365 sign-in</span><br /><span style="font-family:Times New Roman;font-size:medium;"> </span><a href="https://support.microsoft.com/kb/2461628/EN-US"><span style="color:#0000ff;font-size:medium;">https://support.microsoft.com/kb/2461628/EN-US</span></a></p>
<p><span style="font-size:medium;">&nbsp;</span></p>
<p><strong><span style="font-size:medium;">ADFS 2.0 troubleshooter</span></strong></p>
<ul>
<ul>
<li><span style="font-size:medium;"><a href="https://support.microsoft.com/kb/3044971"><span style="color:#0000ff;">Connectivity problems (KB 3044971)</span></a></span></li>
</ul>
</ul>
<ul>
<ul>
<li><span style="font-size:medium;"><a href="https://support.microsoft.com/kb/3044973"><span style="color:#0000ff;">ADFS service problems (KB 3044973)</span></a></span></li>
</ul>
</ul>
<ul>
<ul>
<li><span style="font-size:medium;"><a href="https://support.microsoft.com/kb/3044974"><span style="color:#0000ff;">Certificate problems (KB 3044974)</span></a></span></li>
</ul>
</ul>
<ul>
<ul>
<li><span style="font-size:medium;"><a href="https://support.microsoft.com/kb/3044976"><span style="color:#0000ff;">Authentication issues (KB 3044976)</span></a></span></li>
</ul>
</ul>
<ul>
<ul>
<li><span style="font-size:medium;"><a href="https://support.microsoft.com/kb/3044977"><span style="color:#0000ff;">Claim rules problems (KB 3044977)</span></a></span></li>
</ul>
</ul>
<p><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Calibri;font-size:medium;">Regard</span></p>
<p><strong><span style="font-family:Calibri;font-size:medium;">Abizer</span></strong></p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>Ask The Expert session - Azure Active Directory Your Identity Management Solution for the Cloud</title>
      <link>https://docs.microsoft.com/archive/blogs/abizerh/ask-the-expert-session-azure-active-directory-your-identity-management-solution-for-the-cloud</link>
      <pubDate>Mon, 11 May 2015 04:35:31 GMT</pubDate>
      <dc:creator><![CDATA[Abizer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/abizerh/2015/05/11/ask-the-expert-session-azure-active-directory-your-identity-management-solution-for-the-cloud/</guid>
      <description><![CDATA[Hi Folks
Sharing one of my videos providing an overview of Azure Active Directory (as on April...]]></description>
      <content:encoded><![CDATA[<p>Hi Folks</p>
<p>Sharing one of my videos providing an overview of <strong>Azure Active Directory</strong> (as on April 2015).</p>
<p></p>
<p>Ask The Expert session - Azure Active Directory Your Identity Management Solution for the Cloud</p>
<p><a href="https://www.bing.com/videos/watch/video/ask-the-expert-session-azure-active-directory-your-identity-management-solution/qmt7sz0b">https://www.bing.com/videos/watch/video/ask-the-expert-session-azure-active-directory-your-identity-management-solution/qmt7sz0b</a></p>
<p><a href="https://www.microsoft.com/en-us/showcase/details.aspx?uuid=e33047c1-3b55-4b14-88bb-60594403b575">https://www.microsoft.com/en-us/showcase/details.aspx?uuid=e33047c1-3b55-4b14-88bb-60594403b575</a></p>
<p></p>
<p>happy learning</p>
<p></p>
<p><strong>Abizer</strong></p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>ADFS 2.0 Troubleshooting Document</title>
      <link>https://docs.microsoft.com/archive/blogs/abizerh/adfs-2-0-troubleshooting-document</link>
      <pubDate>Mon, 27 Apr 2015 06:41:58 GMT</pubDate>
      <dc:creator><![CDATA[Abizer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/abizerh/2015/04/27/adfs-2-0-troubleshooting-document/</guid>
      <description><![CDATA[Hi Mates

I have been working with ADFS since the last few years and have tried to list most of...]]></description>
      <content:encoded><![CDATA[<p>Hi Mates</p>
<p></p>
<p>I have been working with ADFS since the last few years and have tried to list most of the troubleshooting steps related to ADFS 2.0, categorized under 5 public articles. </p>
<p></p>
<p>I suggest you go through these to narrow down the cause of any issues with ADFS 2.0 and resolve them.</p>
<p></p>
<ul>
<li>
<p><a href="https://support.microsoft.com/kb/3044971">Connectivity problems (KB 3044971)</a></p>
</li>
<li>
<p><a href="https://support.microsoft.com/kb/3044973">ADFS service problems (KB 3044973)</a></p>
</li>
<li>
<p><a href="https://support.microsoft.com/kb/3044974">Certificate problems (KB 3044974)</a></p>
</li>
</ul>
<ul>
<li><a href="https://support.microsoft.com/kb/3044976">Authentication issues (KB 3044976)</a></li>
</ul>
<p></p>
<ul>
<li><a href="https://support.microsoft.com/kb/3044977">Claim rules problems (KB 3044977)</a></li>
</ul>
<p></p>
<p>Hope this helps.</p>
<p></p>
<p><strong>Abizer</strong></p>
<p></p>
<p><span style="font-family:Times New Roman;font-size:medium;"> </span></p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>ADFS on Azure VMs</title>
      <link>https://docs.microsoft.com/archive/blogs/abizerh/adfs-on-azure-vms</link>
      <pubDate>Tue, 19 Nov 2013 12:40:00 GMT</pubDate>
      <dc:creator><![CDATA[Abizer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/abizerh/2013/11/19/adfs-on-azure-vms/</guid>
      <description><![CDATA[Updated 11/2014 after some new feature releases in Azure VM space:
&nbsp;
Hi folks
&nbsp;
While...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size:small;">Updated 11/2014 after some new feature releases in Azure VM space:<br /></span></p>
<p><span style="font-size:small;">&nbsp;</span></p>
<p><span style="font-size:small;">Hi folks</span></p>
<p>&nbsp;</p>
<p><span style="font-size:small;">While recently working on some ADFS deployments on Azure, I learned a lot of stuff. Thought of sharing my learnings with all, some of it documented already, some not documented clearly.</span></p>
<p>&nbsp;</p>
<p><span style="font-size:small;text-decoration:underline;">Possible Deployments of ADFS on Azure:</span></p>
<p>&nbsp;</p>
<ol>
<li><span style="font-size:small;">All ADFS servers, ADFS proxies, DCs on&nbsp;Azure.</span></li>
</ol>
<ul>
<li style="margin-left:30px;"><span style="font-size:small;">Option 1: With ADFS servers behind&nbsp;load balanced VIP, and ADFS proxies pointing to VIP.</span></li>
<li style="margin-left:30px;"><span style="font-size:small;">Option 2: With ADFS proxies pointing&nbsp;to the DIP(Dedicated IP) of ADFS servers in a one to one relationship.</span></li>
<li style="margin-left:30px;"><strong><span style="font-size:small;">Option 3 (RECOMMENDED) : Load balance the DIP(Dedicated Internal IP) of the ADFS servers. </span></strong><strong><span style="font-size:small;">Make the ADFS proxies point to the load balanced Internal IP of the ADFS service.<br /></span></strong></li>
</ul>
<p><span style="font-size:small;"></span></p>
<p><span style="font-size:small;">&nbsp;</span></p>
<p><span style="font-size:small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.&nbsp; Hybrid setup with ADFS servers, ADFS&nbsp;proxies and DCs distributed across on premise and Azure site, with either </span><span style="font-size:small;">Azure setup as primary or DR.</span></p>
<p>&nbsp;</p>
<p><span style="font-size:small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.&nbsp; ADFS proxies on Azure pointing to load&nbsp;balanced ADFS servers on-premises through the site-to-site VPN.</span></p>
<p>&nbsp;</p>
<p><span style="font-size:small;"><span style="text-decoration:underline;">General recommendations:</span><span style="text-decoration:underline;">&nbsp;</span></span></p>
<ul>
<li><span style="font-size:small;">Recommended to have 2 instances of ADFS and ADFS proxy for redundancy reasons, especially when the Azure site is hosting the primary/full ADFS deployment. These 2 instanced of the same role should be a part of the same Availability Set.</span></li>
</ul>
<p>&nbsp;</p>
<ul>
<li><span style="font-size:small;">ADFS servers require communication with DCs, these DCs can be setup on Azure or we can have ADFS query the DCs on-premises using the site to site VPN link.</span></li>
</ul>
<p>&nbsp;</p>
<ul>
<li><span style="font-size:small;">DCs in Azure site to Support ADFS:</span></li>
</ul>
<ul>
<li><span style="font-size:small;">When extending the existing forest to Azure, make sure you have at least 1 DC of each domain in the forest, in the Azure site.</span></li>
<li><span style="font-size:small;">If it satisfies your application&#39;s objective, you can also have a separate forest hosted on Azure with/without a NT Trust with On-premises forest.</span></li>
<li><span style="font-size:small;">Its preferable to have the GC and DNS roles on the DC too. This would reduce the traffic going to the GCs on-premises, for evaluating the universal group membership.</span></li>
<li><span style="font-size:small;">All the ADFS servers and DCs need to be a part of the same virtual network, else they would not be able to communicate with each other using the internal DIPs (Dedicated DHCP leased IP address assigned to the&nbsp; VM).</span></li>
<li><span style="font-size:small;">Windows Azure-provided DNS, does not meet the advanced name resolution needs of Windows Server AD DS. For example, it does not support dynamic SRV records, and so on. Name resolution is a critical configuration item for DCs and domain-joined clients. DCs must be capable of&nbsp; registering resource records and resolving other DC&rsquo;s resource records. Hence its best to add the DNS role to one of the DCs in Azure and add that DNS server&rsquo;s IP to the&nbsp;VNET configuration.</span></li>
<li><span style="font-size:small;">Move the DCs in Azure to a separate AD site created to represent Azure. Map the subnet in the VNet (Virtual Network) to the AD site, so that the ADFS servers in the same VNet prefer the local DC.</span></li>
<li><span style="font-size:small;">The Azure site having the ADFS setup can host&nbsp;either&nbsp;RWDC and RODC.</span></li>
<li><span style="font-size:small;">Since RODC is meant for site which are not secure, it may not ideally qualify for deployment on Azure, BUT one may still consider it from a cost saving perspective as RODC do not replicate any data out, resulting in less egress traffic, hence less cost.</span></li>
<li><span style="font-size:small;">RODCs if deployed also need to be configured to cache passwords of all users who will be authenticated via ADFS, this it to prevent downtime on ADFS authentication, when site to site VPN is down. Now if your application or ADFS needs to authenticate all user in domain, for the same reason you are planning to cache all user passwords on RODC, you are better of with RWDC.</span></li>
<li><span style="font-size:small;">While ADFS can authenticate against RODC, if the user password is cached on RODC. The ADFS server will need access to the writable DCs when there is a configuration change in ADFS like the Token signing certificate rollover.</span></li>
<li><span style="font-size:small;">When using RWDC, you may have to configure site link, replication interval, change notification, compression to suite your objectives, i.e. lower latency or reduced traffic etc.</span></li>
<li><span style="font-size:small;"><span style="font-size:small;">When deploying DC on Azure VM, <span style="text-decoration:line-through;">don&rsquo;t assign a static address to it&nbsp;</span>you can reserve the dedicated internal IP assigned to the DC via Powershell cmdlet Set-AzureStaticVNetIP</span></span><span style="font-size:small;">. A tip to ensure that the dynamic IP sticks with the VM is to shutdown the VM from within the OS and not from the Azure portal. Shutting down any VM from the portal with de-allocate the resources assigned to it including the dynamic IP.</span></li>
<li><span style="font-size:small;">Ensure that the DCs have an additional data disk (With NO caching ) added to the DC&#39;s VM.&nbsp;Store&nbsp;the NTDS and sysvol&nbsp;content on this data disk. This is to prevent data corruption in case of recovery, as data disks with NO caching ensures that the all the committed transactions are written to the database/disk.</span></li>
<li><span style="font-size:small;">As a security best practice, once the site to site VPN is setup and we can access the Azure DC using its DIP, we should remove&nbsp;all endpoints exposed via the public IP of the VM.</span></li>
</ul>
<p>&nbsp;</p>
<ul>
<li><span style="font-size:small;">DCs on-premises to support ADFS:</span></li>
</ul>
<ul>
<li><span style="font-size:small;">With the ADFS servers and ADFS proxies on the Azure site, if we don&rsquo;t have a local DC in the same Azure VNet and the ADFS servers have to contact on-prem DC for authentication, ldap queries, Secure channel etc,&nbsp;In this scenario, we are looking at high amount of egress traffic leading to more&nbsp;cost and also the VPN link being the single point of failure.</span></li>
<li><span style="font-size:small;">Some may want to just use the Azure site for ADFS proxies while the ADFS server and DC are on-premises. This may help if you want the Intranet users to get Single Sign on experience while authenticating with internal load balanced ADFS servers using Windows Integrated Authentication.</span></li>
</ul>
<p>&nbsp;</p>
<p><span style="font-size:small;text-decoration:underline;">ADFS specific recommendations (Mainly for deployment option 1, i.e. full ADFS setup in Azure)</span></p>
<p>&nbsp;</p>
<ul>
<li><span style="font-size:small;">ADFS proxies should&nbsp;be a part of the same cloud service, leading to common VIP (Virtual Public IP)&nbsp;and should have a load balanced endpoint for TCP 443. The ADFS proxy VM should have there own Availability Set too.</span></li>
</ul>
<p>&nbsp;</p>
<ul>
<li><span style="font-size:small;">The public name of the ADFS service for <em>Example: STS.contoso.com</em>, should be configured as a Cname pointing to the public DNS name of the VIP <em>example: ADFSprx.cloudapp.net </em>. We should not map the ADFS service name to the VIP IP of the ADFS proxies, as the VIP IP can change, during the lifetime of the cloud service. There is not an option to reserve this VIP assigned to a cloud service too, which can be used for ADFS proxy cloud service.</span></li>
</ul>
<p>&nbsp;</p>
<ul>
<li><span style="font-size:small;">Ideally ADFS proxies should resolve the ADFS service name to the backend ADFS servers. This can be done using Host files and split DNS configuration.</span></li>
</ul>
<p>&nbsp;</p>
<ul>
<ul>
<li><span style="font-size:small;">Host file on the ADFS proxy servers, mapping the ADFS service name to VIP&nbsp;of the ADFS servers.</span>
<ul>
<li><span style="font-size:small;">The challenge here could be that the proxies will not be able to reach the ADFS&nbsp; service if the VIP of the backend ADFS servers has changed. Hence this requires you to monitor the health of the ADFS servers and the VIP assigned to it and manually change mapping on the proxy to redirect traffic to the correct ADFS farm.</span></li>
</ul>
</li>
</ul>
</ul>
<p>&nbsp;</p>
<ul>
<ul>
<li><span style="font-size:small;">Host file on the ADFS proxy servers mapping ADFS service name to the DIP of the individual ADFS servers. Basically have the one to one mapping between the ADFS proxy and ADFS server.</span></li>
</ul>
<ul>
<li><span style="font-size:small;">The challenge here is that when one of the ADFS servers is unresponsive, a proxy&nbsp; server getting a portion of the external request will try to forward it to the mapped unresponsive ADFS server and fail. Hence this requires you to monitor the health of the ADFS servers and manually change mapping on the proxy to redirect traffic to the working ADFS server.</span></li>
</ul>
</ul>
<p>&nbsp;</p>
<ul>
<ul>
<li><span style="font-size:small;">Configure Host file on ADFS proxy to point to the load balanced internal IP of the ADFS servers (RECOMMENDED).</span></li>
</ul>
</ul>
<p>&nbsp;</p>
<ul>
<li><span style="font-size:small;">ADFS servers can also be assigned a VIP with load balanced endpoint (TCP 443). This can be a security concern as via the VIP we would be exposing the domain joined ADFS server to the internet.</span></li>
</ul>
<p>&nbsp;</p>
<ul>
<ul>
<li><span style="font-size:small;">ADFS server&rsquo;s VIP ACL can be configure on the load balanced VIP endpoint to only allow traffic&nbsp;from proxy servers to the ADFS servers, securing the ADFS servers.</span></li>
</ul>
</ul>
<p>&nbsp;</p>
<ul>
<ul>
<li><span style="font-size:small;">The ADFS proxy when talking to the backend ADFS service farm via load balanced VIP, will be doing it over the internet. Which means that though the ADFS server and proxies are in the same VNet, the ADFS proxy VM may attract an extra charge for the Egress traffic to backend ADFS servers.</span></li>
</ul>
</ul>
<p>&nbsp;</p>
<ul>
<li><span style="font-size:small;">In a setup where the whole ADFS setup is on the cloud, its recommended that you configure IE, Web-proxy so that internal users (connected to corporate network) contact the ADFS service via the external AD FS proxy endpoints instead of internal AD FS endpoints. Using only external endpoints removes the VPN connection as a single point of failure for internal user authentication to Office 365. </span><span style="font-size:small;">Using only external endpoints for the ADFS service also means that additional authentication prompts may occur for users because ADFS treats all authentication requests as coming from users on the Internet.</span></li>
</ul>
<p>&nbsp;</p>
<ul>
<li><span style="font-size:small;">The alternative to the recommended approach above is to direct internal AD FS traffic over the VPN&nbsp;to the ADFS servers directly or&nbsp;through the use of a DNS record.</span></li>
</ul>
<p>&nbsp;</p>
<ul>
<li><span style="font-size:small;">If&nbsp; the primary site for ADFS is Azure then ensure than the primary role is on the Azure VM.</span></li>
</ul>
<p>&nbsp;</p>
<ul>
<li><span style="font-size:small;">ADFS setup should be an ADFS farm using WID.</span></li>
</ul>
<p>&nbsp;</p>
<ul>
<li><span style="font-size:small;">Windows Azure&trade; Active Directory and Office 365 support several security token services, including AD&nbsp;FS, <span style="text-decoration:underline;"><a href="https://technet.microsoft.com/en-us/library/jj205456.aspx">Shibboleth Identity Provider</a> (<a href="https://technet.microsoft.com/en-us/library/jj205456.aspx">https://technet.microsoft.com/en-us/library/jj205456.aspx</a>),</span></span><br /><span style="font-size:small;">and <span style="text-decoration:underline;"><a href="https://technet.microsoft.com/en-us/library/jj679342.aspx">other third-party providers</a> (<a href="https://technet.microsoft.com/en-us/library/jj679342.aspx">https://technet.microsoft.com/en-us/library/jj679342.aspx</a>)</span>. While it may be feasible to deploy Shibboleth or other third-party providers on Virtual Machines, these providers haven&rsquo;t been tested by Microsoft for the above deployment.</span></li>
</ul>
<p>&nbsp;</p>
<ul>
<li><span style="font-size:small;">ADFS on Azure can have multiple RP, which can include Office 365, another claim based application hosted on another VM in Azure, claim based application registered with Azure Active Directory which has the domain federated, claim based application hosted externally etc.</span></li>
</ul>
<p>&nbsp;</p>
<p><span style="font-size:small;"><strong><span style="text-decoration:underline;">References:</span></strong></span></p>
<p>&nbsp;</p>
<p><span style="font-size:small;">Guidelines for Deploying Windows Server Active Directory on Windows Azure Virtual Machines</span></p>
<p><a href="https://msdn.microsoft.com/en-us/library/azure/jj156090.aspx">https://msdn.microsoft.com/en-us/library/azure/jj156090.aspx</a></p>
<p>&nbsp;</p>
<p><span style="font-size:small;">Office 365 Adapter: Deploying Office 365 Single Sign-On using Windows Azure</span></p>
<p><a href="https://www.microsoft.com/en-in/download/details.aspx?id=38845">https://www.microsoft.com/en-in/download/details.aspx?id=38845</a></p>
<p>&nbsp;</p>
<p><span style="font-size:small;">Hope this helps,</span></p>
<p><span style="font-size:small;">-&nbsp;&nbsp;Abizer</span></p>]]></content:encoded>
    </item>
    <item>
      <title>How an incorrectly configured account lockout policy can give more pain than security.</title>
      <link>https://docs.microsoft.com/archive/blogs/abizerh/how-an-incorrectly-configured-account-lockout-policy-can-give-more-pain-than-security</link>
      <pubDate>Sun, 21 Apr 2013 03:23:46 GMT</pubDate>
      <dc:creator><![CDATA[Abizer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/abizerh/2013/04/21/how-an-incorrectly-configured-account-lockout-policy-can-give-more-pain-than-security/</guid>
      <description><![CDATA[I don't believe this..... we still see environments with Account Lockout policy set with a threshold...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: book antiqua,palatino; font-size: small;">I don't believe this..... we still see environments with Account Lockout policy set with a threshold of 3, with lockout duration of 2 or 5 minutes etc.</span></p>
<p><span style="font-family: book antiqua,palatino; font-size: small;">Most of them, spend a good amount of money and time addressing these lockouts, and affecting business functions while the addressing them. </span></p>
<p><span style="font-family: book antiqua,palatino; font-size: small;"></span></p>
<p><span style="font-family: book antiqua,palatino; font-size: small;">I have tried to list down some points that will indicate that the Account lockout policy with a low threshold, like 3 is NOT recommended. In fact an INCORRECTLY configured Account Lockout policy will cause more downtime for the business them help it.</span></p>
<p><span style="font-family: book antiqua,palatino; font-size: small;">A better security practice it to have a </span></p>
<p><span style="font-family: book antiqua,palatino; font-size: small;">-&nbsp;&nbsp; Strict password policy + disabled account lockout policy </span><br /><span style="font-family: book antiqua,palatino; font-size: small;">OR</span><br /><span style="font-family: book antiqua,palatino; font-size: small;">-&nbsp;&nbsp; Strict password policy + correctly lockout policy with high lockout threshold.</span></p>
<p>&nbsp;</p>
<p><span style="font-family: book antiqua,palatino; font-size: small;">1.&nbsp;&nbsp; Microsoft's recommendations:</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;"><a href="https://technet.microsoft.com/en-us/library/cc757692(WS.10).aspx">https://technet.microsoft.com/en-us/library/cc757692(WS.10).aspx</a>&nbsp;&nbsp;</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">"Brute force password attacks can be automated to try thousands or even millions of password combinations for any or all user accounts. Limiting the number of failed logons that can be performed nearly eliminates the effectiveness of such attacks.</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">However, it is important to note that, in contrast, a denial-of-service attack could be performed on a domain that has an account lockout threshold configured. A malicious user could programmatically attempt a series of password attacks against all users in the organization. If the number of attempts is greater than the value of Account lockout threshold, the attacker could potentially lock out every account.</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">Because vulnerabilities can exist both when this value is configured and when it is not, any organization should weigh their identified threats and the risks that they are trying to mitigate. There are two options to consider for this policy setting:</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">Set Account lockout threshold to 0. This ensures that accounts will not be locked out. This setting will prevent a denial-of-service attack that intentionally locks out all or some accounts. In addition, this setting helps reduce Help desk calls because users cannot accidentally lock themselves out of their accounts.</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">Because it will not prevent a brute force attack, a value of 0 should only be chosen if both of the following criteria are explicitly met:</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Password Policy settings force all users to have complex passwords made up of eight or more characters.</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A robust auditing mechanism is in place to alert administrators when a series of failed logons are occurring in the environment.</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">If these criteria cannot be met, set Account lockout threshold to a high enough value that users can accidentally mistype their password several times before they are locked out of their account, but ensure that a brute-force password attack would still lock out the account. It is advisable to specify a value of 50 invalid logon attempts. Keep in mind, however, that although this setting can reduce the number of Help desk calls by reducing the number of user lockouts, it cannot prevent a denial-of-service attack."</span></p>
<p>&nbsp;</p>
<p>2.&nbsp;&nbsp; <span style="font-family: book antiqua,palatino; font-size: small;">Security Configuration Benchmark for Windows environment from &lsquo;Center for Internet Security&rsquo;</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;"><a href="https://benchmarks.cisecurity.org/tools2/windows/CIS_Microsoft_Windows_7_Benchmark_v1.1.0.pdf">https://benchmarks.cisecurity.org/tools2/windows/CIS_Microsoft_Windows_7_Benchmark_v1.1.0.pdf</a></span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">&ldquo;Account lockout threshold</span><br /><span style="font-family: book antiqua,palatino; font-size: small;">Description:</span><br /><span style="font-family: book antiqua,palatino; font-size: small;">This control defines the number of failed logon attempts before a user is locked out of an account. It is recommended that this setting be configured as described below:</span><br /><span style="font-family: book antiqua,palatino; font-size: small;">- For the SSLF profile(s), the recommended value is 10 invalid logon attempt(s).</span><br /><span style="font-family: book antiqua,palatino; font-size: small;">- For the Enterprise profile(s), the recommended value is 50 invalid logon attempt(s).</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">Rationale:</span><br /><span style="font-family: book antiqua,palatino; font-size: small;">Enforcing an account lockout threshold will almost eliminated the effectiveness of automated brute force password attacks and improves the security of a system&rdquo;</span></p>
<p>&nbsp;</p>
<p><span style="font-family: book antiqua,palatino; font-size: small;">3.&nbsp;&nbsp; Security Configuration Benchmark for Windows environment from &ldquo;National Security Agency&rdquo;</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;"><a href="https://www.nsa.gov/ia/_files/os/win2003/oldFiles/MSCG-001R-2003.pdf">https://www.nsa.gov/ia/_files/os/win2003/oldFiles/MSCG-001R-2003.pdf</a></span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">&ldquo;Account lockout threshold</span><br /><span style="font-family: book antiqua,palatino; font-size: small;">Table 2.10: Settings</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">Domain Member&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Default Legacy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Client Enterprise&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Client High Security</span><br /><span style="font-family: book antiqua,palatino; font-size: small;">0 invalid login attempts&nbsp;&nbsp; 50 invalid login attempts 50 invalid login attempts 10 invalid login attempts</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">The Account lockout threshold setting determines the number of attempts that a user can make to log on to an account before it is locked. Authorized users can lock themselves out of an account by incorrectly entering their password, or by changing their password on one computer while logged on to another computer. The computer with the incorrect password may continuously try to authenticate the user, and because the password it is using to authenticate is incorrect, the user account is eventually locked out. To avoid locking out authorized users, set the account lockout threshold to a high number.&rdquo;</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;"></span></p>
<p><span style="font-family: book antiqua,palatino; font-size: small;">4.&nbsp;&nbsp; Other popular blogs talking about the same:</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;"><a href="https://www.windowsecurity.com/articles/Implementing-Troubleshooting-Account-Lockout.html">https://www.windowsecurity.com/articles/Implementing-Troubleshooting-Account-Lockout.html</a></span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;"></span></p>
<p><span style="font-family: book antiqua,palatino; font-size: small;">5.&nbsp;&nbsp; Below are some numbers that will help you understand the above recommendations better.</span></p>
<p>&nbsp;</p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">*<em>*Assuming that you have an account lockout policy with a threshold set to 3, lockout duration of 0&nbsp;and a password policy with minimum password lenght of 8.</em></span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">An analysis of your current lockout and password policy is as follows:-</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;"><span style="color: #993300;">94</span> possible characters ^ <span style="color: #993300;">8</span> character per password (minimum password length) = <span style="color: #993300;">6,095,689,385,410,816</span> possible passwords.</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">You guess a password on average half way through a brute force attack = <span style="color: #993300;">6095689385410816 / 2 = 3047844692705408</span> average guesses required.</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">Because the lockout duration is not defined and accounts are only unlocked by Administrators, we have to pick an average amount of time it might take an account to be unlocked. Let's assume <span style="color: #993300;"><strong>30</strong></span> <span style="color: #993300;">minutes</span> (it's probably longer which will reduce the odds further). Another reason why I'm taking 30 minutes is because if the&nbsp;lockout duration is defined, it would mostly be 30 minutes.</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">Only <span style="color: #993300;">3 guesses</span> i.e. bad passwords (current threshold) can be accepted by AD every <span style="color: #993300;">30 minutes</span> (approx. lockout duration) = <span style="color: #993300;">1 guess every 10 minutes</span>.</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">Each password remains the same for 42 days (assuming you have a <span style="color: #993300;">max password age is 42 days</span>, which is the default), so you have</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">42&nbsp;days * 24 hours per day * 60 minutes per hour * 1/10 guesses per minute = <span style="color: #993300;">6048 guesses per password lifetime</span>.</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">The average chance of guessing the password = </span><span style="font-family: book antiqua,palatino; font-size: small;">6048 guesses per password lifetime / 3047844692705408 average guesses required =<span style="color: #993300;"> 1 in 503942574852 chance of guessing the password in 42 days</span>.</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">If the <span style="color: #993300;">lockout threshold were increased from 3 to 10</span>, the chance of guessing the password over the 42 day password lifetime would be<span style="color: #993300;"> 1 in 151182772455.</span> Still quite small!!</span></p>
<p style="padding-left: 30px;"><span style="color: #008000;"><strong><span style="font-family: book antiqua,palatino; font-size: small;">Increasing the required password length to 9 with an account lockout threshold of 10 results in the chance of guessing the password over the 42 day password lifetime of 1 in 14211180610828 - a chance 28 times stronger than the earlier policy with threshold of 3.</span></strong></span></p>
<p style="padding-left: 30px;">&nbsp;</p>
<p><span style="font-family: book antiqua,palatino; font-size: small;">The above information was about the lockout threshold, now taking of the <strong>Account lockout duration</strong>,</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">It is advisable to set Account lockout duration to approximately 30 minutes. A value of 0 specifies that the account will be locked out until an administrator explicitly unlocks it.</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">To configure the value for this policy setting so that it never automatically unlocks the account might seem like a good idea, because then the admins/helpdesk gets a chance to investigate the cause of lockout, but doing so can increase the number of requests that your organization&rsquo;s Help desk receives to unlock accounts that were locked by mistake.</span></p>
<p style="padding-left: 30px;"><span style="font-family: book antiqua,palatino; font-size: small;">To unlock the account automatically after a <em>nn</em> number of minutes, it needs to be set along side auditing so that the administrator gets to know if there are unusual amount of lockouts which need investigation. We recommend that you atleast set the lockout duration to 30 mins. If you reduce the lockout duration further down (like 2 or 5 minutes) to reduce the impact to the end user, you are undoing the purpose of having a account lockout policy and also adding up to the AD replication traffic.</span></p>
<p>&nbsp;</p>
<p><span style="font-family: book antiqua,palatino; font-size: small;">Hope the above information helps you configure the account lockout policy correctly.</span></p>
<p>&nbsp;</p>
<p><span style="font-family: book antiqua,palatino; font-size: small;">regards</span></p>
<p><strong><span style="font-family: book antiqua,palatino; font-size: small;">Abizer </span></strong></p>]]></content:encoded>
    </item>
    <item>
      <title>More information about SSO experience when authenticating via ADFS</title>
      <link>https://docs.microsoft.com/archive/blogs/abizerh/more-information-about-sso-experience-when-authenticating-via-adfs</link>
      <pubDate>Thu, 11 Apr 2013 01:13:00 GMT</pubDate>
      <dc:creator><![CDATA[Abizer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/abizerh/2013/04/11/more-information-about-sso-experience-when-authenticating-via-adfs/</guid>
      <description><![CDATA[Common understanding about SSO:
Which may mean user enters username/password once, and does not...]]></description>
      <content:encoded><![CDATA[<p><em><strong>Common understanding about SSO:</strong></em></p>
<p><em>Which may mean user enters username/password once, and does not need to reenter again during the same session.</em></p>
<p><em>It may also mean that when accessing different application/resources, we need not enter different credentials, but enter the same ones.</em></p>
<p>&nbsp;</p>
<p>AD FS 2.0 enables identity federation, extending the notion of above centralized authentication, authorization, and single sign-on to Web applications and services located virtually anywhere.</p>
<p>As previously introduced, identity federation relies on standards-based protocols to establish federation trusts between claims providers and relying parties, facilitating secure access to Web applications and services across security boundaries.</p>
<p>For an organization, AD FS 2.0 provides corporate users with a rich federated experience and seamless access to resources located:</p>
<p>- Inside the corporate intranet;</p>
<p>- Outside the corporate network in a corporate perimeter network, extranet and/or in the Cloud, for example in the Microsoft Windows Azure platform, the Microsoft&rsquo;s Platform as a Service (PaaS) offering;</p>
<p>- At the perimeter networks of partner organizations that have made resources available to the considered organization&rsquo;s users;</p>
<p>- In the Cloud with Software as a Service (SaaS) vendors that support federated identity, for example, Microsoft with its Microsoft Office 365 offerings in the context of this paper.</p>
<p>&nbsp;</p>
<p><em>While ADFS service provides Single Sign On (SSO) experience, below are a few points we need to be aware of to make the experience seamless. It should also help avoid confusion around Single Sign On when working with ADFS.</em><br />&nbsp;</p>
<p><span style="text-decoration: underline;"><strong>Common pre-requisites</strong></span></p>
<p>- Although any current Web browser with <strong>JScript</strong> enabled can work as an ADFS client, only Internet Explorer, Mozilla Firefox, and Safari on Apple Macintosh have been tested by Microsoft. For performance reasons, we highly recommend that JScript be enabled.</p>
<p>- <strong>Cookies</strong> must be enabled, or at least trusted, for the federation servers and Web applications that are being accessed. It&rsquo;s using Cookies that we prevent repeated logons to a service, within the same session. Cookies can also prevent repeated home realm discovery prompts with that are more claim providers on the STS. The authentication cookie is signed but not encrypted, which is one reason why use of TLS/SSL is mandatory in ADFS.<br />&nbsp;</p>
<p><span style="text-decoration: underline;"><strong>SSO when on the intranet from a domain joined machine, logged in with a domain credential:</strong></span></p>
<p>To ensure the user is not prompted for his logged in credentials again, when accessing ADFS from intranet, the following configuration needs to be in place.</p>
<p>- In Internal <strong>DNS</strong> should resolve the ADFS service name to the backend ADFS servers or Load balanced IP for ADFS service. Domain Name System (DNS) resolution of the AD FS 2.0 service endpoint should not be performed through CNAME record lookup, instead we should add a A record for the ADFS service name.</p>
<p>- The <strong>Web-proxy</strong> configured on the client should be configured to bypass proxy, for request to ADFS URL</p>
<p>- The ADFS URL should be added to the <strong>IE</strong> &gt; Security &gt;<strong>Intranet zones</strong> &gt; sites. This is done because IE &gt; security &gt; Local Intranet &gt; Security Settings &gt; user authentication &ndash; logon is configured to use the logged in credentials for Intranet sites.</p>
<p>- Ensure that IE &gt; advanced &gt; '<strong>Enable Integrated Windows Authentication'</strong> is checked.</p>
<p>- Ensure that an <strong>SPN</strong> &lsquo;HOST/<em>ADFSservicename</em>&rsquo; is registered for the ADFS service under the ADFS farm service account, to allow Kerberos authentication.</p>
<p>- The default authentication configuration for the ADFS service (in C:\inetpub\adfs\ls\<strong>web.config</strong>) is Integrated Windows Authentication, ensure that it has not been changed to Form-based Authentication.</p>
<p><a href="https://social.technet.microsoft.com/wiki/contents/articles/1600.ad-fs-2-0-how-to-change-the-local-authentication-type.aspx">https://social.technet.microsoft.com/wiki/contents/articles/1600.ad-fs-2-0-how-to-change-the-local-authentication-type.aspx</a><br />&nbsp;</p>
<p>- The credentials prompt can only be avoided when you are accessing the cloud service using the same account used to logon to the workstation.</p>
<p>- If a user chooses to save his credentials in the <strong>'credentials manager'</strong> (By selecting save password checkbox in the credential prompt) for use with ADFS, that saved credentials will only provide an SSO experience till the user changes his password. If the credential manager is not updated with the new password of the user, it will continue to use old user credentials and prompt the user for good credentials, after a number of failed attempts with the stale saved credentials.</p>
<p>- If user A wants to access User B&rsquo;s mailbox, user B&rsquo;s credentials has to be provided and ADFS will prompt you for user B credentials because it has no ways of guessing it by itself. But once User B&rsquo;s credentials has been provided and the user is authenticated, the Browser may cache the <br />user B&rsquo;s credentials and would reuse it&nbsp; when the same instance of IE is used to access the same application or authenticate via the same ADFS service.</p>
<p>- ADFS and most of the web applications do write <strong>cookies</strong> on the client machine after being authenticated/authorized, these cookies may be session specific or may be valid across sessions. If these cookies are valid, and presented again to the application /ADFS, by the browser, the user is allowed in without repeated authentication. For example, after being logged into Sharepoint or O365, we write a few AUTH related session cookies on the client. These cookies are presented again, if you access a link in the web application that opens up another page in the same windows or another tab, sharing the same session cookies. These session based cookies should expire once you sign-out of the application/ ADFS, post which the user may need to authenticate again.</p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;"><strong>SSO when accessing resources from over the Internet or an External network:</strong></span></p>
<p>- When getting redirected to ADFS for authentication, our request hit the <strong>ADFS proxy</strong> (assuming you have the ADFS proxy configured, a workgroup server in DMZ network), which presents us a Form asking for user credentials.</p>
<p>- The default configuration on ADFS proxy is <strong>Form-Based Authentication</strong>, where the user is presented with a webpage asking for credentials. Since we use SSL to connect to ADFS proxy and passing credentials, the communication with the server is secure and encrypted. This authentication request with credential is later passed to the ADFS server over a SSL session, for getting the user authenticated.</p>
<p>- The reason why we stick to form based authentication when going via the proxy is because it just requires the SSL port 443 to be exposed. We cannot do Windows Integrated Authentication over the internet, because the ports and services required for it cannot be exposed to the internet.</p>
<p>- Apart from this, when accessing a resource from over the internet (using a home computer or public computer), using the logged in credentials does not help because you may not be logged in with domain credentials. Hence you may get prompted for credentials.</p>
<p>&nbsp;</p>
<p>Another alternative to the form-based authentication is the <strong>TLS (certificate based authentication)</strong>, where the user certificate which represents the user credentials need to be present on the client workstation.</p>
<p>- This configuration cannot be selectively done for a set of user but need to be set as the default authentication method on ADFS proxy.</p>
<p>- The challenge here is that a user will only get authenticated via ADFS when he has the correct certificate, else access denied. So you have to deploy certificates to all users who access the close service via the internet.</p>
<p>- In this scenario too, if the client machine has multiple certificates in the user store, the user will be prompted to choose a certificate.</p>
<p>&nbsp;</p>
<p>When outside the corpnet network, the user can choose to <strong>VPN</strong> in to the corpnet or use <strong>DirectAccess</strong> to connect to corpnet and then access ADFS as if they are connected to Intranet.</p>
<p>&nbsp;</p>
<p>At times you may see ADFS repeatedly prompting for credentials, this could be related to &ldquo;<strong>Extended protection</strong>&rdquo; that is enabled for Windows Authentication for the ADFS/LS application. In IIS when Extended Protection for Windows Authentication is enabled, authentication requests are bound to both the Service Principal Names (SPN) of the server to which the client tries to connect and to the outer Transport Layer Security (TLS) channel over which Integrated Windows Authentication happens. Extended protection enhances the existing Windows Authentication functionality to mitigate authentication relay or "man in the middle" attacks. Certain browsers/fiddler cannot work with &ldquo;Extended protection&rdquo;, it would throw repeated prompts followed by access denied. Disabling &ldquo;Extended protection&rdquo; helps is such scenario.</p>
<p style="padding-left: 30px;">&nbsp;</p>
<p style="padding-left: 30px;">Browser Issues with Extended Protection for Authentication<br /><a href="https://technet.microsoft.com/en-us/library/hh852537.aspx">https://technet.microsoft.com/en-us/library/hh852537.aspx</a></p>
<p style="padding-left: 30px;"><a href="https://social.technet.microsoft.com/wiki/contents/articles/1426.ad-fs-2-0-continuously-prompted-for-credentials-while-using-fiddler-web-debugger.aspx">https://social.technet.microsoft.com/wiki/contents/articles/1426.ad-fs-2-0-continuously-prompted-for-credentials-while-using-fiddler-web-debugger.aspx</a></p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;"><strong>More references:</strong></span></p>
<p>Below some references to related to SSO in Office 365 environment with help of ADFS 2.0</p>
<p style="padding-left: 30px;">&nbsp;</p>
<p style="padding-left: 30px;">Office 365 Single Sign-On with AD FS 2.0 whitepaper<br /><a href="https://www.microsoft.com/en-us/download/details.aspx?id=28971">https://www.microsoft.com/en-us/download/details.aspx?id=28971</a></p>
<p style="padding-left: 30px;">&nbsp;</p>
<p style="padding-left: 30px;">A federated user is prompted unexpectedly to enter their credentials when they access an Office 365 resource<br /><a href="https://support.microsoft.com/kb/2535227">https://support.microsoft.com/kb/2535227</a></p>
<p style="padding-left: 30px;">&nbsp;</p>
<p style="padding-left: 30px;">A federated user is repeatedly prompted for credentials when he or she connects to the AD FS 2.0 service endpoint during Office 365 sign-in<br /><a href="https://support.microsoft.com/kb/2461628">https://support.microsoft.com/kb/2461628</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Regards</p>
<p><strong>Abizer</strong></p>]]></content:encoded>
    </item>
    <item>
      <title>Information about Email addresses assigned to a licensed user in O365</title>
      <link>https://docs.microsoft.com/archive/blogs/abizerh/information-about-email-addresses-assigned-to-a-licensed-user-in-o365</link>
      <pubDate>Mon, 08 Apr 2013 09:25:33 GMT</pubDate>
      <dc:creator><![CDATA[Abizer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/abizerh/2013/04/08/information-about-email-addresses-assigned-to-a-licensed-user-in-o365/</guid>
      <description><![CDATA[&nbsp;
The Onmicrosoft.com email address gets stamped the time an Exchange license is assigned to...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p>
<p>The Onmicrosoft.com email address gets stamped the time an Exchange license is assigned to the user. When creating the Onmicrosoft.com email address for the user, we look at the mailNickname attribute value for this user on the cloud.<br />The mailNickName value is derived from 3 places:</p>
<p>&nbsp;</p>
<p>o&nbsp;&nbsp; From AD, if the mailNickName attribute is present and populated with a value. This mailNickName attribute gets added as a part of extending the AD schema when preparing for Exchange.</p>
<p>&nbsp;</p>
<p>o&nbsp;&nbsp; From the Primary SMTP address specified in AD (i.e. the Mail and ProxyAddresses attributes). If <a href="mailto:Abizer.Haz@contoso.com">Abizer.Haz@contoso.com</a> is set as primary SMTP address, &ldquo;Abizer.Haz&rdquo; will be used as the mailNickname on the cloud side.</p>
<p>&nbsp;&nbsp;</p>
<p>o&nbsp;&nbsp; If the above 2 values are not present, we rely on the UPN to derive the mailNickname. If UPN is <a href="mailto:Abizerh@contoso.com">Abizerh@contoso.com</a>, then the mailNickname would be &ldquo;Abizerh&rdquo;.</p>
<p>&nbsp;</p>
<p>The Onmicrosoft.com email address added initially, will always stay with the user, while he is on the cloud.</p>
<p>&nbsp;</p>
<p>The OTHER time the Onmicrosoft.com email added is added to the user is when:</p>
<p>The user has a loginname with xx.onmicrosoft.com suffix (like <a href="mailto:abizerh11@contoso.onmicrosoft.com">abizerh11@contoso.onmicrosoft.com</a>) and the loginname is changed to another login name with the same xx.onmicrosoft.com suffix (<a href="mailto:Abizerh22@contoso.onmicrosoft.com">Abizerh<strong>22</strong>@contoso.onmicrosoft.com</a>),<br />we add a new smtp address that matches the new loginname. So now the user would have 2 Onmicrosoft email addresses i.e <a href="mailto:Abizerh11@contoso.onmicrosoft.com">Abizerh11@contoso.onmicrosoft.com</a>&nbsp;and <a href="mailto:Abizerh22@contoso.onmicrosoft.com">Abizerh<strong>22</strong>@contoso.onmicrosoft.com</a>.</p>
<p>&nbsp;</p>
<p>-&nbsp;&nbsp;&nbsp;&nbsp;When a user on cloud with login name <a href="mailto:userxx@verifieddomain.com">userxx@verifieddomain.com</a>&nbsp;(Eg: <a href="mailto:user1@contoso.com">user1@contoso.com</a>) changes his loginname on cloud to <a href="mailto:userxx@xxx.onmicrosoft.com">userxx@xxx.onmicrosoft.com</a>, we add a new smtp address that matches the new loginname.</p>
<p>&nbsp;</p>
<p>**We ensure that for every user licensed for Exchange, we have a smtp address for the user that matches his or her UPN.</p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;">Example:</span></p>
<p>For a user <a href="mailto:UserA@contoso.com">UserA@contoso.com</a>&nbsp;UPN, they would have a proxyaddress <a href="mailto:UserA@contoso.com">UserA@contoso.com</a></p>
<p>-&gt; When the user UPN / login name changes to <a href="mailto:UserB@contoso.com">UserB@contoso.com</a>, the proxy addresses would get updated to include <a href="mailto:UserB@contoso.com">UserB@contoso.com</a></p>
<p>**Same goes for a user with login name <a href="mailto:UserC@contoso.onmicrosoft.com">UserC@contoso.onmicrosoft.com</a>.</p>
<p>&nbsp;</p>
<p>You cannot update the Onmicrosoft.com email addressed for a Dirsync-ed user, by adding the Onmicrosoft.com email address to the proxyaddress list of the AD user.</p>
<p>After assigning the Exchange license to the user, once his mailbox is created, if you plan to modify the prefix of the email addresses by modifying the mailNickName attribute of the AD user and syncing it to the cloud, it does not affect the<br />email address for the user on cloud. This does not help even if you remove and assign the Exchange license with the new mailNickname.</p>
<p>&nbsp;</p>
<p>Email addresses that will not get synced from on-premise AD to Cloud for a user:</p>
<ul>
<li>Email with suffix for which you don&rsquo;t have a verified domain under your tenant.</li>
</ul>
<p>&nbsp;</p>
<ul>
<li>Email addresses which are already present for a different user, contact or groups&nbsp;on cloud.</li>
</ul>
<p>&nbsp;</p>
<ul>
<li>Email with onmicrosoft.com in the suffix.</li>
</ul>
<p>&nbsp;</p>
<p>Method used to modify the login name of users under the tenant, that trigger updated to the proxyaddresses:</p>
<p>-&nbsp; Set-MsolUserPrincipalName&nbsp;-UserPrincipalName [ExistingUPN]&nbsp;-NewUserPrincipalName [NewUPN]</p>
<p>&nbsp;</p>
<p>Cmdlet used to update the Email address directly:</p>
<p>-&nbsp; Set-Mailbox -Identity "joe@contoso.com" -EmailAddresses @("SMTP:joe@contoso.com";"smtp:joe123@contoso.onmicrosoft.com";"sip:joe1@contoso.com")</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Regards</p>
<p><strong>Abizer</strong></p>]]></content:encoded>
    </item>
    <item>
      <title>SupportMultipleDomain switch, when managing SSO to Office 365</title>
      <link>https://docs.microsoft.com/archive/blogs/abizerh/supportmultipledomain-switch-when-managing-sso-to-office-365</link>
      <pubDate>Tue, 05 Feb 2013 19:51:00 GMT</pubDate>
      <dc:creator><![CDATA[Abizer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/abizerh/2013/02/05/supportmultipledomain-switch-when-managing-sso-to-office-365/</guid>
      <description><![CDATA[Use of SupportMultipleDomain switch, when managing SSO to Office 365 using ADFS
&nbsp;
When a SSO...]]></description>
      <content:encoded><![CDATA[<p><span style="text-decoration: underline;"><span style="background: yellow; color: #333333; font-family: 'arial','sans-serif'; font-size: 10pt; text-decoration: underline;" lang="EN">Use of <span id="#h2" class="KeywordHighlight">SupportMultipleDomain</span> switch, when managing SSO to Office 365 using ADFS</span></span></p>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="color: #333333; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">&nbsp;</span></h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="color: #333333; font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;" lang="EN">When a SSO is enabled for O365 via ADFS, you should see the Relying Party (RP) trust created for O365.</span></h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="color: #333333; font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;" lang="EN">&nbsp;</span>&nbsp;</h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="color: #333333; font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;" lang="EN"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/40/2577.a.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-40/2577.a.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/40/2577.a.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-40/2577.a.png" alt="" border="0" /></a>&nbsp;</span></h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="text-decoration: underline;"><span style="color: #333333; font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal; text-decoration: underline;" lang="EN">Commands that would create the RP trust for O365 are below:</span></span></h1>
<h1 style="background: white; margin: 5pt 0in 0pt 0.5in;"><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">New-MsolFederatedDomain -DomainName</span></code><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">&lt;domain&gt;</span></code></h1>
<h1 style="background: white; margin: 5pt 0in 0pt 0.5in;"><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">OR</span></h1>
<h1 style="background: white; margin: 5pt 0in 0pt 0.5in;"><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">Convert-MsolDomainToFederated -DomainName &lt;domain&gt;</span></code></h1>
<h1 style="background: white; margin: 5pt 0in 0pt 0.5in;"><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">OR</span></h1>
<h1 style="background: white; margin: 5pt 0in 0pt 0.5in;"><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">Update-MSOLFederatedDomain -DomainName &lt;domain&gt;</span></code></h1>
<h1 style="background: white; margin: 5pt 0in 0pt 0.5in;"><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">**<code><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">Update-MSOLFederatedDomain as the name suggest if you update an existing federation trust between ADFS and O365, In this process it will update or recreate the RP on ADFS side.</span></code></span></h1>
<h1 style="background: white; margin: 5pt 0in 0pt 0.5in;">&nbsp;</h1>
<h1 style="background: white; margin-bottom: 0pt;"><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">&nbsp;</span><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">The RP trust created above comes with 2 claims rules</span></h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">&nbsp;</span></code></h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">'Get-MsolFederationProperty -DomainName &lt;domain&gt;' for the federated domains shows that the &ldquo;FederationServiceIdentifier&rdquo; was the same for source ADFS and O365 i.e. the <br /></span></code><span lang="EN-IN"><a href="https://stsname/adfs/Services/trust"><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;" lang="EN-US">https://<strong>STSname</strong>/adfs/Services/trust</span></a></span></h1>
<h1 style="background: white; margin-bottom: 0pt;">&nbsp;&nbsp;</h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/40/2055.b.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-40/2055.b.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/40/2055.b.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-40/2055.b.png" alt="" border="0" /></a></h1>
<h1 style="background: white; margin: 0in 0in 0pt;">&nbsp;</h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="text-decoration: underline;"><span style="font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">With the ADFS rollup 1 update, we added the following functionality</span></span><span style="text-decoration: underline;"><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;" lang="EN">:</span></span></h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">&nbsp;</span><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;" lang="EN">&nbsp;</span></h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><em><span style="font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">Support for Multiple Top Level Domains</span></em></h1>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt;"><em><span style="font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">&ldquo;Currently, Microsoft Office 365 customers who utilize single sign-on (SSO) through AD FS 2.0 and have multiple top level domains for users' user principal name (UPN) suffixes within their organization (for example, @contoso.com or @fabrikam.com) are required to deploy a separate instance of AD FS 2.0 Federation Service for each suffix.&nbsp; There is now a rollup for AD FS 2.0 <span style="color: black;">(</span></span></em><span lang="EN-IN"><a href="https://support.microsoft.com/kb/2607496" target="_blank"><em><span style="font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">https://support.microsoft.com/kb/2607496</span></em></a></span><em><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">) that works in conjunction with the &ldquo;<span id="#h4" class="KeywordHighlight">SupportMultipleDomain</span>&rdquo; switch to enable the AD FS server to support this scenario without requiring additional AD FS 2.0 servers.</span></em><em><span style="color: #333333; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">&rdquo;</span></em></p>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;" lang="EN">&nbsp;</span></h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="text-decoration: underline;"><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;" lang="EN">Commands that can be used&nbsp;to create the RP trust for O365, to support multiple top level domain:</span></span></h1>
<h1 style="background: white; margin: 5pt 0in 0pt 0.5in;"><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">New-MsolFederatedDomain -DomainName </span></code><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">&lt;domain&gt;</span></code><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt;"> -SupportMultiDomain</span></code></h1>
<h1 style="background: white; margin: 5pt 0in 0pt 0.5in;"><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">OR</span></h1>
<h1 style="background: white; margin: 5pt 0in 0pt 0.5in;"><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">Update-MSOLFederatedDomain -DomainName &lt;domain&gt; </span></code><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">-</span></code><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN"><span id="#h5" class="KeywordHighlight">SupportMultipleDomain</span></span></h1>
<h1 style="background: white; margin: 5pt 0in 0pt 0.5in;"><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN"><span class="KeywordHighlight">OR</span></span></h1>
<h1 style="background: white; margin: 5pt 0in 0pt 0.5in;"><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">Convert-MsolDomainToFederated -DomainName &lt;domain&gt;</span></code><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt;"> -</span></code><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN"><span id="#h6" class="KeywordHighlight">SupportMultipleDomain</span></span></h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;" lang="EN">&nbsp;</span></h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">Post using <span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN"><span id="#h6" class="KeywordHighlight"><strong>SupportMultipleDomain</strong> switch, the following 2 changes take place:</span></span></span></code></h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;"><strong><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN"><span class="KeywordHighlight">1. &nbsp;</span></span></strong>'Get-MsolFederationProperty -DomainName &lt;domain&gt;' on the federated domains now shows that the &ldquo;<strong>FederationServiceIdentifier</strong>&rdquo; is </span></code><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">different</span></code><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;"> for ADFS and O365. Every federated domain will have the &ldquo;FederationServiceIdentifier&rdquo; as </span></code><span lang="EN-IN"><span><span><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;" lang="EN-US">https://<strong>&lt;domainname&gt;/</strong>adfs/services/trust/</span></span></span></span><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;"> whereas the ADFS configuration still has </span><span lang="EN-IN"><a href="https://stsname/adfs/Services/trust"><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;" lang="EN-US">https://<strong>STSname</strong>/adfs/Services/trust</span></a></span><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">.</span></code></h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><span>&nbsp;</span></h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/40/2313.3.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-40/2313.3.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/40/2313.3.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-40/2313.3.png" alt="" border="0" /></a></h1>
<h1 style="background: white; margin: 0in 0in 0pt;">&nbsp;</h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;" lang="EN">Due to this mismatch in configuration, <strong>we need to ensure that when a token is sent to O365 the issuer mentioned in it, is the same as one configured for the Domain in O365</strong>. Therefore <strong>the </strong><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN"><span id="#h6" class="KeywordHighlight"><strong>SupportMultipleDomain also adds the following 3rd claim rule in the O365 RP</strong>, under ADFS. </span></span>If not you will get the error below:</span></h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;" lang="EN">&nbsp;</span>&nbsp;</h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="font-family: arial, sans-serif; font-size: 10pt; font-weight: normal;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/40/5367.4.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-40/5367.4.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/40/5367.4.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/450x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-40/5367.4.png" alt="" border="0" /></a>&nbsp;</span></h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;" lang="EN">So what does this&nbsp;</span><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">3<sup>rd</sup> claim rule&nbsp;added by <span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN"><span id="#h6" class="KeywordHighlight"><strong>SupportMultipleDomain </strong></span></span>to the&nbsp;RP trust for O365, do</span></h1>
<h1 style="background: white; margin: 0in 0in 0pt;">&nbsp;</h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="text-decoration: underline;"><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal; text-decoration: underline;" lang="EN">Default 3<sup>rd</sup> rule:</span></span></h1>
<p style="margin: 0in 3.75pt 0pt 45.8pt;"><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">c:[Type <br />== "</span><span lang="EN-IN"><a href="https://schemas.xmlsoap.org/claims/UPN"><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN-US">https://schemas.xmlsoap.org/claims/UPN</span></a></span><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">"]</span></p>
<p style="margin: 0in 3.75pt 0pt 45.8pt;"><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">=&gt; issue(Type = "</span><span lang="EN-IN"><a href="https://schemas.microsoft.com/ws/2008/06/identity/claims/issuerid"><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN-US">https://schemas.microsoft.com/ws/2008/06/identity/claims/issuerid</span></a></span><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">", Value = regexreplace(c.Value, "</span><span lang="EN-IN"><a href="mailto:.+@(?%3cdomain%3e.+)"><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN-US">.+@(?&lt;domain&gt;.+)</span></a></span><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">", "</span><span lang="EN-IN"><span><span><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN-US">https://${domain}/adfs/services/trust/</span></span></span></span><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">"));</span></p>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;" lang="EN">&nbsp;</span></h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;" lang="EN">This rule uses the suffix value of user&rsquo;s UPN and uses that to generate a new claim called Issuerid. For example, for a user User1@<strong>contoso.com</strong> , the issuerID in his Token will be </span><span lang="EN-IN"><a href="https://contoso.com/adfs/services/trust/"><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;" lang="EN-US">https://<strong>contoso.com</strong>/adfs/services/trust/</span></a>.</span></h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">&nbsp;</span></h1>
<p><span lang="EN">Using </span><span lang="EN-IN"><a href="https://www.fiddler2.com/fiddler2/" target="_blank"><span lang="EN">fiddler</span></a></span><span lang="EN">, we can trace the token being passed to login.microsoftonline.com/login.srf. After copying the token passed in wresult, paste the content in notepad and save that file as .xml.</span></p>
<p><span lang="EN">Later you can open the token saved as .xml file using IE and see its content.</span></p>
<p>&nbsp;&nbsp;</p>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/40/2022.5.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-40/2022.5.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/40/2022.5.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-40/2022.5.png" alt="" border="0" /></a></span></h1>
<h1 style="background: white; margin: 0in 0in 0pt;">&nbsp;</h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/40/1325.c.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-40/1325.c.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/40/1325.c.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-40/1325.c.png" alt="" border="0" /></a>&nbsp;</h1>
<p style="background: white; margin: 0in 0in 0pt;">&nbsp;</p>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">It&rsquo;s interesting to note that the <span style="color: #000080;"><strong>though this rule issues 'Issuerid' claim, we don&rsquo;t see this claim in the response token, in fact we see the &ldquo;</strong></span></span><span style="color: #000080;"><strong><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">Issuer</span></strong><span style="font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;"><strong>&rdquo; attribute modified to the newly composed value</strong>.</span></span></h1>
<h1 style="background: white; margin: 0in 0in 0pt;"><span style="color: #000080; font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;" lang="EN">&nbsp;</span></h1>
<h1 style="background: white; margin: 0in 0in 0pt; text-indent: 0.5in;"><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">&lt;saml:Assertion MajorVersion="1" MinorVersion="1" <br />AssertionID="_2546eb2e-a3a6-4cf3-9006-c9f20560097f" </span><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">Issuer="</span><span lang="EN-IN"><a href="https://contoso.com/adfs/services/trust/"><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN-US">https://contoso.com/adfs/services/trust/</span></a></span><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">"</span><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;"> IssueInstant="2012-12-23T04:07:30.874Z" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"&gt;</span></h1>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt;"><span style="color: #333333; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">&nbsp;</span></p>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt;"><span style="text-decoration: underline;"><span style="color: #333333; font-family: 'arial','sans-serif'; font-size: 10pt; text-decoration: underline;" lang="EN">NOTE</span></span><span style="color: #333333; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">: <span style="color: #800000;"><strong>If </strong></span></span><span style="color: #800000;"><strong><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">&ndash;</span></code></strong><span style="font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN"><strong><span id="#h8" class="KeywordHighlight">SupportMultipleDomain</span> is used without the ADFS rollup 1 or 2 installed</strong>. <strong>You will see that the response token generated by ADFS has BOTH the Issuer=&rdquo;</strong></span></span><strong><span style="color: #800000;"><span lang="EN-IN"><a href="https://stsname/adfs/Services/trust"><span style="color: #800000; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN-US">https://STSname/adfs/Services/trust</span></a></span><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">&rdquo; </span></code></span><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN"><span style="color: #800000;">and the claim &ldquo;Issuerid&rdquo; with the composed value as per the 3<sup>rd</sup> claim rule</span>.</span></strong></p>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt;"><strong>&nbsp;</strong></p>
<h1 style="background: white; margin: 0in 0in 0pt; text-indent: 0.5in;"><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;">&lt;saml:Assertion MajorVersion="1" MinorVersion="1" <br />AssertionID="_2546eb2e-a3a6-4cf3-9006-c9f20560097f" </span><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">Issuer="</span><span lang="EN-IN"><a href="https://sts.contoso.com/adfs/services/trust/"><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN-US">https://STS.contoso.com/adfs/services/trust/</span></a></span><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">"</span><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt; font-weight: normal;"> IssueInstant="2012-12-23T04:07:30.874Z" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"&gt;</span></h1>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt; text-indent: 0.5in;"><span style="background: yellow; color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">&hellip;</span></p>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt; text-indent: 0.5in;"><span style="background: yellow; color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">&lt;saml:Attribute <br />AttributeName="<strong>issuerid</strong>" AttributeNamespace="</span><span lang="EN-IN"><a href="https://schemas.microsoft.com/ws/2008/06/identity/claims"><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">https://schemas.microsoft.com/ws/2008/06/identity/claims</span></a></span><span style="background: yellow; color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">"&gt;<strong>&lt;saml:AttributeValue&gt;</strong></span><span lang="EN-IN"><a href="https://contoso.com/adfs/services/trust/%3c/saml:AttributeValue"><strong><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">https://contoso.com/adfs/services/trust/&lt;/saml:AttributeValue</span></strong></a></span><strong><span style="background: yellow; color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">&gt; <br /></span></strong><span style="background: yellow; color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">&lt;/saml:Attribute&gt;</span></p>
<p style="background: white; margin: 5pt 0in 0pt 0.75in; line-height: 13.5pt; text-indent: -0.25in;"><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">-</span><span style="color: black; font-size: 7pt;" lang="EN">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">This will again lead to <span style="color: #800000;">error &ldquo;<strong>Your organization could not sign you in to this service&rdquo;</strong></span></span></p>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt;"><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">&nbsp;</span></p>
<h1 style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt;"><em><span style="font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">Support for Sub domains</span></em></h1>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt;"><em><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">&ldquo;It is important to note that the <strong>&ldquo;<span id="#h9" class="KeywordHighlight">SupportMultipleDomain</span>&rdquo; switch is not required when you have a single top level domain and multiple sub domains</strong>.&nbsp; For example if the domains used for upn suffixes are @sales.contoso.com, @marketing.contoso.com <br />and @contoso.com and the top level domain (contoso.com in this case) was added first and federated then you don&rsquo;t need to use the &ldquo;<span id="#h10" class="KeywordHighlight">SupportMultipleDomain</span>&rdquo; switch.&nbsp; This is because these sub domains are effectively managed within the scope of the parent and a single AD FS server can be utilized to handle this already.&rdquo;</span></em></p>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt;"><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN"><br /><strong>If however, you have multiple top level domains (@contoso.com and @fabrikam.com) and these domains also have sub domains (@sales.contoso.com and @sales.fabrikam.com) the &ldquo;<span id="#h11" class="KeywordHighlight">SupportMultipleDomain</span>&rdquo; switch will not work for the sub domains and these users will not be able to login</strong>.&nbsp; <br /></span></p>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt;"><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">&nbsp;</span></p>
<p style="background: white; margin: 5pt 0in 0pt 0.5in; line-height: 13.5pt;"><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">Why will this switch not work, in the above scenario?</span></p>
<p style="background: white; margin: 5pt 0in 0pt 0.5in; line-height: 13.5pt;"><span style="text-decoration: underline;"><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt; text-decoration: underline;" lang="EN">Answer</span></span><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">:</span></p>
<p style="background: white; margin: 5pt 0in 0pt 0.75in; line-height: 13.5pt; text-indent: -0.25in;"><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">-</span><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">For child domain, sharing the same namespace, we don&rsquo;t federate them separately. The federated root domain covers the child as well, which mean that the </span><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">federationServiceIdentifier value for the child domain will also be the same as that of parent i.e. </span></code><span lang="EN-IN"><a href="https://contoso.com/adfs/services/trust/"><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN-US">https://contoso.com/adfs/services/trust/</span></a></span></p>
<p style="background: white; margin: 5pt 0in 0pt 0.5in; line-height: 13.5pt;"><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">&nbsp;</span></p>
<p style="background: white; margin: 5pt 0in 0pt 0.75in; line-height: 13.5pt; text-indent: -0.25in;"><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">-</span><span style="color: black; font-size: 7pt;" lang="EN">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">But the 3<sup>rd</sup> claim rule which ends up picking the UPN suffix for the user to compose the Issuer value ends up with </span><span lang="EN-IN"><a href="https://child1.contoso.com/adfs/services/trust/"><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN-US">https://Child1.contoso.com/adfs/services/trust/</span></a></span><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">, again causing a mismatch and hence the error </span><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">&ldquo;<strong>Your organization could not sign you in to this service&rdquo;</strong></span></p>
<p style="background: white; margin: 5pt 0in 0pt 0.5in; line-height: 13.5pt;"><strong><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">&nbsp;</span></strong></p>
<p style="background: white; margin: 5pt 0in 0pt 0.5in; line-height: 13.5pt;"><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">To resolve this, we can modify the 3<sup>rd</sup> rule such that it ends up generating an Issuer value that matches &ldquo;</span><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">FederationServiceIdentifier&rdquo; for the domain at O365 end. 2 different rules that can work in this scenario are below. This rule just picks up the root domain from the UPN suffix to compose the Issuer value. For a UPN suffix child1.contoso.com, it will still generate an Issuer value of </span></code><span lang="EN-IN"><a href="https://contoso.com/adfs/services/trust/"><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN-US">https://contoso.com/adfs/services/trust/</span></a></span><span style="font-family: 'arial','sans-serif'; font-size: 10pt;"> instead of &nbsp;<span style="background: yellow;"><a href="https://child1.contoso.com/adfs/services/trust/">https://Child1.contoso.com/adfs/services/trust/</a></span> (with default rule)</span></p>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt;"><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">&nbsp;</span></code>&nbsp;&nbsp;</p>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt; padding-left: 30px;"><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/40/5078.6.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-40/5078.6.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/40/5078.6.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-40/5078.6.png" alt="" border="0" /></a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span></code></p>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt;"><code></code>&nbsp;</p>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt;"><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt;"><span style="text-decoration: underline;">Customized <br />3<sup>rd</sup> rule</span></span></code></p>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt; padding-left: 30px;">&nbsp;<code><span style="font-family: 'arial','sans-serif'; font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="text-decoration: underline;">Rule 1:</span></span></code></p>
<p style="margin: 0in 3.75pt 0pt 45.8pt;"><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">c:[Type == "</span><span lang="EN-IN"><a href="https://schemas.xmlsoap.org/claims/UPN"><span style="background: yellow; color: windowtext; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN-US">https://schemas.xmlsoap.org/claims/UPN</span></a></span><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">"]</span></p>
<p style="margin: 0in 3.75pt 0pt 45.8pt;"><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">=&gt; issue(Type = "</span><span lang="EN-IN"><a href="https://schemas.microsoft.com/ws/2008/06/identity/claims/issuerid"><span style="background: yellow; color: windowtext; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN-US">https://schemas.microsoft.com/ws/2008/06/identity/claims/issuerid</span></a></span><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">", Value = regexreplace(c.Value, "^((.*)([.|@]))?(?&lt;domain&gt;[^.]*[.].*)$", "</span><span lang="EN-IN"><span><span><span style="background: yellow; color: windowtext; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN-US">https://${domain}/adfs/services/trust/</span></span></span></span><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">"));</span></p>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt;"><span style="color: #333333; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">&nbsp;</span></p>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt; padding-left: 60px;"><span style="color: #333333; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">OR</span></p>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt; padding-left: 60px;">&nbsp;</p>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt; text-indent: 0.5in;"><span style="text-decoration: underline;"><span style="color: #333333; font-family: 'arial','sans-serif'; font-size: 10pt; text-decoration: underline;" lang="EN">Rule 2:</span></span></p>
<p style="margin: 0in 3.75pt 0pt 0.5in;"><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">c:[Type <br />== "</span><span lang="EN-IN"><a href="https://schemas.xmlsoap.org/claims/UPN"><span style="background: yellow; color: windowtext; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN-US">https://schemas.xmlsoap.org/claims/UPN</span></a></span><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">"]</span></p>
<p style="margin: 0in 3.75pt 0pt 0.5in;"><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">=&gt; issue(Type = "</span><span lang="EN-IN"><a href="https://schemas.microsoft.com/ws/2008/06/identity/claims/issuerid"><span style="background: yellow; color: windowtext; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN-US">https://schemas.microsoft.com/ws/2008/06/identity/claims/issuerid</span></a></span><span style="background: yellow; font-family: 'arial','sans-serif'; font-size: 10pt;">", Value = </span><span style="background: yellow;" lang="EN-IN">regexreplace(c.Value, &ldquo;^((.*)([.|@]))?(?&lt;domain&gt;[^.]*.(com|net|co|org)(.\w\w)?)$&rdquo;, &ldquo;<a href="https://$%7bdomain%7d/adfs/services/trust/"><span style="color: windowtext;">https://${domain}/adfs/services/trust/</span></a>&rdquo;));</span></p>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt; text-indent: 0.5in;">&nbsp;</p>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt; text-indent: 0.5in;">Sample output from the above rule:</p>
<p style="padding-left: 60px;">[regex]::replace("<a href="mailto:abizerh@contoso.com">abizerh@contoso.com</a>", &ldquo;^((.*)([.|@]))?(?&lt;domain&gt;[^.]*.(com|net|co|org)(.\w\w)?)$&rdquo;, 'https://${domain}/adfs/services/trust')<br /><a href="https://contoso.com/adfs/services/trust">https://contoso.com/adfs/services/trust</a></p>
<p style="padding-left: 60px;">[regex]::replace("<a href="mailto:abizerh@contoso.co.in">abizerh@contoso.co.in</a>", &ldquo;^((.*)([.|@]))?(?&lt;domain&gt;[^.]*.(com|net|co|org)(.\w\w)?)$&rdquo;, 'https://${domain}/adfs/services/trust')<br /><a href="https://contoso.co.in/adfs/services/trust">https://contoso.co.in/adfs/services/trust</a></p>
<p style="padding-left: 60px;">[regex]::replace("<a href="mailto:abizerh@child.contoso.co.in">abizerh@child.contoso.co.in</a>", &ldquo;^((.*)([.|@]))?(?&lt;domain&gt;[^.]*.(com|net|co|org)(.\w\w)?)$&rdquo;, 'https://${domain}/adfs/services/trust')<br /><a href="https://contoso.co.in/adfs/services/trust">https://contoso.co.in/adfs/services/trust</a></p>
<p style="padding-left: 60px;">[regex]::replace("<a href="mailto:abizerh@child.contoso.org">abizerh@child.contoso.org</a>", &ldquo;^((.*)([.|@]))?(?&lt;domain&gt;[^.]*.(com|net|co|org)(.\w\w)?)$&rdquo;, 'https://${domain}/adfs/services/trust')<br /><a href="https://contoso.org/adfs/services/trust">https://contoso.org/adfs/services/trust</a></p>
<p>&nbsp;</p>
<p style="background: white; margin: 0in 0in 0pt; line-height: 13.5pt; text-indent: 0.5in;">&nbsp;<span style="text-decoration: underline;"><span>Note:</span></span></p>
<p style="margin-left: 0.5in;"><em><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">The rules above may not apply to all scenarios, but can be customized to </span></em><em><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">ensure that the Issuerid value matches &ldquo;</span></em><code><em><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">FederationServiceIdentifier&rdquo; for the domain added/federated at O365 end.</span></em></code></p>
<p style="margin-left: 0.5in;"><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">&nbsp;</span></p>
<p style="margin-left: 0.5in;"><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">The mismatch of <code><span style="font-family: 'arial','sans-serif';">federationServiceIdentifier between ADFS and O365 for a domain can also be corrected by modifying the </span></code></span><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">&ldquo;</span><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">federationServiceIdentifier&rdquo; for the domain at O365 end, to match the </span></code><span style="color: black; font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN">&ldquo;</span><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">federationServiceIdentifier&rdquo; <br />for ADFS. But the federationServiceIdentifier can only be configured for ONE federated domain and not all.</span></code></p>
<p><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">&nbsp;</span></code></p>
<p style="text-indent: -0.25in; margin-left: 0.75in;"><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">-</span></code><code><span style="font-family: 'times new roman','serif'; font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></code><code><span style="font-family: 'arial','sans-serif'; font-size: 10pt;">Set-MSOLDomainFederationSettings -domainname&nbsp; Contoso.com &ndash;issueruri </span></code><span lang="EN-IN"><a href="https://sts.contoso.com/adfs/services/trust/"><span style="font-family: 'arial','sans-serif'; font-size: 10pt;" lang="EN-US">https://STS.contoso.com/adfs/services/trust/</span></a></span></p>
<p style="text-indent: -0.25in; margin-left: 0.75in;">&nbsp;</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">More information that should help you write your own claim rules.</span></strong></p>
<p>&nbsp;</p>
<p style="padding-left: 30px;">The Role of the Claim Rule Language<br /><a href="https://technet.microsoft.com/en-us/library/dd807118(WS.10).aspx">https://technet.microsoft.com/en-us/library/dd807118(WS.10).aspx</a></p>
<p style="padding-left: 30px;">&nbsp;</p>
<p style="padding-left: 30px;">Understanding Claim Rule Language in AD FS 2.0<br /><a href="https://social.technet.microsoft.com/wiki/contents/articles/4792.understanding-claim-rule-language-in-ad-fs-2-0.aspx#General_Syntax_of_the_Claim_Rule_Language">https://social.technet.microsoft.com/wiki/contents/articles/4792.understanding-claim-rule-language-in-ad-fs-2-0.aspx#General_Syntax_of_the_Claim_Rule_Language</a></p>
<p style="padding-left: 30px;">&nbsp;</p>
<p style="padding-left: 30px;">Regular Expressions<br /><a href="https://technet.microsoft.com/en-us/library/hh440535.aspx">https://technet.microsoft.com/en-us/library/hh440535.aspx</a></p>
<p><span style="font-family: Tahoma; font-size: x-small;"><br /></span></p>
<p>Hope this info helps&nbsp;</p>
<p>&nbsp;</p>
<p>Cheers</p>
<p>Abizer</p>]]></content:encoded>
    </item>
    <item>
      <title>Kerberos Error KDC_ERR_POLICY while trying to access a resource in the Trusted forest (Forest Trust)</title>
      <link>https://docs.microsoft.com/archive/blogs/abizerh/kerberos-error-kdc_err_policy-while-trying-to-access-a-resource-in-the-trusted-forest-forest-trust</link>
      <pubDate>Wed, 18 May 2011 10:03:30 GMT</pubDate>
      <dc:creator><![CDATA[abizer_hazrat]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/abizerh/2011/05/18/kerberos-error-kdc_err_policy-while-trying-to-access-a-resource-in-the-trusted-forest-forest-trust/</guid>
      <description><![CDATA[Symptoms  Forest1 = 2003dom.local  Forest2 = 2008dom.local  2-way Forest Trust created between them,...]]></description>
      <content:encoded><![CDATA[<h4><b>Symptoms</b></h4>  <p>Forest1 = 2003dom.local</p>  <p>Forest2 = 2008dom.local</p>  <p>2-way Forest Trust created between them, with forest level authentication.</p>  <p>**User from Forest2 access a server in Trusted Forest1 i.e. <a href="file:///\\2003-dc1.2003dom.local\">\\2003-dc1.2003dom.local</a></p>  <p>Here is what I see in the network capture on the source machine in Forest2</p>  <p><em></em></p>  <p><em>2008-dc1.2008dom.local </em><em>2003-dc1.2003dom.local </em><em>KerberosV5:TGS Request <b>Realm: 2003DOM.LOCAL Sname: cifs/2003-dc1.2003dom.local </b></em><b><i>       <br /></i></b><em>2003-dc1.2003dom.local </em><em>2008-dc1.2008dom.local </em><em>KerberosV5 KerberosV5:<b>KRB_ERROR - KDC_ERR_POLICY (12)</b></em></p>  <p>After this Kerberos error, we fallback to NTLM. User gets prompted for credentials and when the credential for a user in Forest2 is provided, that fails too.</p>  <p>**From Forest1 when accessing a server on Forest2 we see Kerberos error below. Here instead of the user getting a referral TGT for the trusted forest krbtgt/2008dom.local, we just see the local domain DC replying with error stating it could not find the service principal name. It never feels the need to go outside its forest.</p>  <p><em></em></p>  <p><em>2003-MEM1 </em><em>2003-dc1.2003dom.local </em><em>KerberosV5 KerberosV5:TGS Request <b>Realm: 2003DOM.LOCAL</b> <b>Sname: cifs/2008-dc1.2008dom.local </b></em><b><i>       <br /></i></b><em>2003-dc1.2003dom.local </em><em>2003-MEM1 KerberosV5 KerberosV5:KRB_ERROR - <b>KDC_ERR_S_PRINCIPAL_UNKNOWN</b> (7)</em></p>  <p>Fallback to NTLM works:</p>  <p><em></em></p>  <p><em>2003-MEM1 2008-dc1.2008dom.local SMB SMB:C; Session Setup Andx, NTLM NEGOTIATE MESSAGE</em><i>     <br /><em>2008-dc1.2008dom.local 2003-MEM1 SMB SMB:R; Session Setup Andx, NTLM CHALLENGE MESSAGE - NT Status: System - Error, Code = (22) STATUS_MORE_PROCESSING_REQUIRED</em>      <br /><em>2003-MEM1 2008-dc1.2008dom.local SMB SMB:C; Session Setup Andx, NTLM AUTHENTICATE MESSAGE, Domain: 2003DOM, User: AdministratoR, Workstation: 2003-MEM1</em>      <br /><em>2008-dc1.2008dom.local 2003-MEM1 SMB SMB:R; Session Setup Andx</em>      <br /><em>2003-MEM1 2008-dc1.2008dom.local SMB SMB:C; Tree Connect Andx, Path = \\2008-DC1.2008DOM.LOCAL\IPC$, Service = ?????</em>      <br /><em>2008-dc1.2008dom.local 2003-MEM1 SMB SMB:R; Tree Connect Andx, Service = IPC</em></i></p>  <h4>&#160;</h4>  <h4>Cause</h4>  <p>We found that Forest1 had domain suffix for the trusted forest (in this case 2008dom.local) added to the Alternate UPN suffix list for the forest. </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/40/metablogapi/4784.upnsuff_49E9B409.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-40-metablogapi/4784.upnsuff_5F00_49E9B409.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="upnsuff" border="0" alt="upnsuff" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/40/metablogapi/3386.upnsuff_thumb_3941934E.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-40-metablogapi/3386.upnsuff_5F00_thumb_5F00_3941934E.jpg" width="589" height="416" /></a> </p>  <p>This had caused the name suffix for *.2008dom.local in the forest trust in the Forest1 (2003dom.local) go into a DISABLED state showing a conflict.</p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/40/metablogapi/5736.namesuffix_5FDFF9CE.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-40-metablogapi/5736.namesuffix_5F00_5FDFF9CE.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="name suffix" border="0" alt="name suffix" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/76/40/metablogapi/1122.namesuffix_thumb_7B54D604.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-76-40-metablogapi/1122.namesuffix_5F00_thumb_5F00_7B54D604.jpg" width="589" height="568" /></a></p>  <p>&#160;</p>  <p>This also explains why the forest1 (2003dom.local) was throwing the Kerberos error KDC_ERR_POLICY, when issuing tickets across forest.</p>  <p>&#160;</p>  <h4>Resolution</h4>  <p>- Remove Alternate UPN suffix from the Forest1, which is similar to the name suffix used in the Trusted domain/forest.</p>  <p>- After this change, we need to validate the trust (both incoming and outgoing) to update the UPN removal to the trust objects in both forest.</p>  <p>- Lastly, we need to Enable the Name suffix for the trusted domain using Trust properties &gt; Name Suffix Routing tab, in Forest1.</p>  <h5></h5>  <h5></h5>  <p><b></b></p>  <p><b>Change the routing status of a name suffix</b></p>  <p><b><a href="https://technet.microsoft.com/en-us/library/cc781019(WS.10).aspx">https://technet.microsoft.com/en-us/library/cc781019(WS.10).aspx</a> </b></p>  <p><b></b></p>  <p><b>Routing name suffixes across forests</b></p>  <p><b><a href="https://technet.microsoft.com/en-us/library/cc784334(WS.10).aspx">https://technet.microsoft.com/en-us/library/cc784334(WS.10).aspx</a></b></p>]]></content:encoded>
    </item>
    <item>
      <title>Tracing down user and computer account deletion in Active Directory</title>
      <link>https://docs.microsoft.com/archive/blogs/abizerh/tracing-down-user-and-computer-account-deletion-in-active-directory</link>
      <pubDate>Thu, 27 May 2010 00:40:37 GMT</pubDate>
      <dc:creator><![CDATA[abizer_hazrat]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/abizerh/2010/05/27/tracing-down-user-and-computer-account-deletion-in-active-directory/</guid>
      <description><![CDATA[&#160;  In order to find out about user and computer account deletion, you must keep the “Account...]]></description>
      <content:encoded><![CDATA[<p><font size="2">&#160;</font></p>  <p><font size="2">In order to find out about user and computer account deletion, <b>you must keep the “Account Management” auditing enabled</b>, beforehand.<b></b></font></p>  <p><u><font size="2"></font></u></p>  <p><u><font size="2">The Account Management auditing needs to be enabled as follows:</font></u></p>  <ul>   <li><font size="2">At Domain Controller OU level, edit the “Default Domain Controller” policy to enable auditing:</font></li> </ul>  <blockquote>   <p><b><font size="2">Computer configuration &gt; Windows settings &gt; Security settings &gt; Local Policies &gt; Audit Policies</font></b></p>    <p><font size="2">- <b>Enable Success for “Audit Account Management”</b></font></p> </blockquote>  <ul>   <li><font size="2">Ensure that the GPO application is working on all DCs.</font></li> </ul>  <p><font size="2"></font></p>  <p><font size="2"></font></p>  <p><b><font size="2"></font></b></p>  <p><b><font size="2">After the User/Computer account deletion occurs, the steps you need to follow to get more information about user or computer account deletion.</font></b></p>  <p><b><font size="2"></font></b></p>  <p><font size="2"><b>Note: </b>The below steps need to be done before you restore the deleted object:</font></p>  <p><b><font size="2"></font></b></p>  <p><font size="2">&#160;</font></p>  <p><font size="2"><strong>1.</strong> Dump the deleted objects in “Deleted objects” container.</font></p>  <blockquote>   <p><font size="2">- <b>Ldifde –x –d “CN=Deleted Objects,DC=<i>domain</i>,DC=<i>com” </i>–f Deletedobj.ldf</b></font></p> </blockquote>  <p><font size="2">&#160;</font></p>  <p><font size="2"><strong>2.</strong> Search the <b>Deletedobj.ldf</b> file for the AD object that got deleted. The name of this object would have a GUID appended to it. Copy the <b>DN</b> attribute value of this object.</font></p>  <blockquote>   <h1><font size="1">=========================================================</font></h1>    <p><font size="1">Extract from the LDF file above showing the deleted user object (TestUser):</font></p>    <p><font size="1"><strong>dn: CN=TestUser\0ADEL:aff006d7-7758-4b24-bb53-6e8f1a87834e,CN=Deleted Objects,DC=2008dom,DC=local</strong></font></p>    <p><font size="1">changetype: add</font></p>    <p><font size="1">objectClass: top</font></p>    <p><font size="1">objectClass: person</font></p>    <p><font size="1">objectClass: organizationalPerson</font></p>    <p><font size="1">objectClass: user</font></p>    <p><font size="1">cn:: dGVydApERUw6YWZmMDA2ZDctNzc1OC00YjI0LWJiNTMtNmU4ZjFhODc4MzRl</font></p>    <p><font size="1">distinguishedName: </font></p>    <p><font size="1">CN=TestUser\0ADEL:aff006d7-7758-4b24-bb53-6e8f1a87834e,CN=Deleted Objects,DC=2008d</font></p>    <p><font size="1">om,DC=local</font></p>    <p><font size="1">instanceType: 4</font></p>    <p><font size="1">whenCreated: 20100526065020.0Z</font></p>    <p><font size="1">whenChanged: 20100526065039.0Z</font></p>    <p><font size="1">uSNCreated: 448479</font></p>    <p><font size="1"><strong>isDeleted: TRUE</strong> – This attribute is set to true when an object is deleted.</font></p>    <p><font size="1">uSNChanged: 448492</font></p>    <p><font size="1">name:: dGVydApERUw6YWZmMDA2ZDctNzc1OC00YjI0LWJiNTMtNmU4ZjFhODc4MzRl</font></p>    <p><font size="1">objectGUID:: 1wbwr1h3JEu7U26PGoeDTg==</font></p>    <p><font size="1">userAccountControl: 512</font></p>    <p><font size="1">objectSid:: AQUAAAAAAAUVAAAARb3/5MeOM1el+HeXPwgAAA==</font></p>    <p><font size="1"><strong>sAMAccountName: TestUser</strong></font></p>    <p><font size="1">lastKnownParent: CN=Users,DC=2008dom,DC=local</font></p>    <h1><font size="1">=========================================================</font></h1> </blockquote>  <p>&#160;</p> <font size="1"></font>  <p><font size="2"><strong>3.</strong> Get the output of the following command on any DC.</font></p>  <blockquote>   <p><font size="2">- <b>Repadmin /Showmeta “DN of the deleted object” &gt; Delshowmeta.txt</b></font></p>    <p><b><font size="2"></font></b></p>    <p><b><font size="2">Eg:</font></b></p>    <p><font size="2"><b>Repadmin /Showmeta “</b>CN=TestUser\0ADEL:aff006d7-7758-4b24-bb53-6e8f1a87834e,CN=Deleted Objects,DC=2008dom,DC=local<b>” &gt; Delshowmeta.txt</b></font></p>    <p><b><font size="2"></font></b></p>    <p><font size="2">&#160;</font></p> </blockquote>  <p><font size="2"><strong>4.</strong> While reviewing the output in<b> Delshowmeta.txt, </b>check<b> </b>the <b>“Org. Time/Date”</b> and the “<b>Originating DC</b>” value of <b>isDeleted</b> attribute of this object. These values will tell you the time of deletion of this object and the source DC used to delete object, respectively.</font></p>  <blockquote>   <p><font size="1">=========================================================</font></p>    <p><font size="1">Output of Showmeta:</font></p>    <p><font size="1">Loc.USN Originating DSA Org.USN Org.Time/Date Ver Attribute</font></p>    <p><font size="1">======= =============== ========= ============= === =========</font></p>    <p><font size="1">448479 SiteA\2008-DC2 448479 2010-05-26 12:20:20 1 objectClass</font></p>    <p><font size="1">448492 SiteA\2008-DC2 448492 2010-05-26 12:20:39 2 cn</font></p>    <p><font size="1">448492 SiteA\2008-DC2 448492 2010-05-26 12:20:39 2 givenName</font></p>    <p><font size="1">448479 SiteA\2008-DC2 448479 2010-05-26 12:20:20 1 instanceType</font></p>    <p><font size="1">448479 SiteA\2008-DC2 448479 2010-05-26 12:20:20 1 whenCreated</font></p>    <p><font size="1">448492 SiteA\2008-DC2 448492 2010-05-26 12:20:39 2 displayName</font></p>    <p><font size="1"><b>448492 </b><b>SiteA\2008-DC2</b><b> 448492 </b><b>2010-05-26 12:20:39 </b><b>1 isDeleted</b></font></p>    <p><font size="1">448479 SiteA\2008-DC2 448479 2010-05-26 12:20:20 1 nTSecurityDescriptor</font></p>    <p><font size="1">448492 SiteA\2008-DC2 448492 2010-05-26 12:20:39 2 name</font></p>    <p><font size="1">448488 SiteA\2008-DC2 448488 2010-05-26 12:20:20 4 userAccountControl</font></p>    <p><font size="1">448492 SiteA\2008-DC2 448492 2010-05-26 12:20:39 2 codePage</font></p>    <p><font size="1">448492 SiteA\2008-DC2 448492 2010-05-26 12:20:39 2 countryCode</font></p>    <p><font size="1">448481 SiteA\2008-DC2 448481 2010-05-26 12:20:20 2 dBCSPwd</font></p>    <p><font size="1">448480 SiteA\2008-DC2 448480 2010-05-26 12:20:20 1 logonHours</font></p>    <p><font size="1">448492 SiteA\2008-DC2 448492 2010-05-26 12:20:39 3 unicodePwd</font></p>    <p><font size="1">448492 SiteA\2008-DC2 448492 2010-05-26 12:20:39 3 ntPwdHistory</font></p>    <p><font size="1">448492 SiteA\2008-DC2 448492 2010-05-26 12:20:39 4 pwdLastSet</font></p>    <p><font size="1">448492 SiteA\2008-DC2 448492 2010-05-26 12:20:39 2 primaryGroupID</font></p>    <p><font size="1">448492 SiteA\2008-DC2 448492 2010-05-26 12:20:39 2 supplementalCredentials</font></p>    <p><font size="1">448479 SiteA\2008-DC2 448479 2010-05-26 12:20:20 1 objectSid</font></p>    <p><font size="1">448492 SiteA\2008-DC2 448492 2010-05-26 12:20:39 2 accountExpires</font></p>    <p><font size="1">448492 SiteA\2008-DC2 448492 2010-05-26 12:20:39 3 lmPwdHistory</font></p>    <p><font size="1">448479 SiteA\2008-DC2 448479 2010-05-26 12:20:20 1 sAMAccountName</font></p>    <p><font size="1">448492 SiteA\2008-DC2 448492 2010-05-26 12:20:39 2 sAMAccountType</font></p>    <p><font size="1">448492 SiteA\2008-DC2 448492 2010-05-26 12:20:39 2 userPrincipalName</font></p>    <p><font size="1">448492 SiteA\2008-DC2 448492 2010-05-26 12:20:39 1 lastKnownParent</font></p>    <p><font size="1">448492 SiteA\2008-DC2 448492 2010-05-26 12:20:39 2 objectCategory</font></p>    <p><font size="1">=========================================================</font></p>    <p><font size="1"></font></p> </blockquote>  <p><font size="2"><strong>5</strong>. With the above info, we need to just check the security event logs on the “<b>Originating DSA</b>” during <b>“Org. Time/Date”. </b></font><font size="2">With “<b>Account Management</b>” auditing enabled on the DCs, we should see the following events in the security log.</font></p>  <blockquote>   <p><font size="2"><u>For computer account deletion:</u></font></p>    <p><font size="2">·&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; On Windows 2003, we should get <b>Event ID: 647</b></font></p>    <p><font size="2">·&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; On Windows 2008, we should get <b>Event ID: 4743</b></font></p>    <p><font size="2"><u>For User account deletion</u>:</font></p>    <p><font size="2">·&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; On Windows 2003, we should get <b>Event ID: 630</b></font></p>    <p><font size="2">·&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; On Windows 2008, we should get <b>Event ID: 4726</b></font></p> </blockquote>  <blockquote>   <p><font size="1">=========================================================</font></p>    <p><font size="1">Below is an example of an event confirming deletion and providing info about who deleted it.</font></p>    <p><font size="1">Log Name: Security</font></p>    <p><font size="1">Source: Microsoft-Windows-Security-Auditing</font></p>    <p><b><font size="1">Date: 5/26/2010 12:20:39 PM</font></b></p>    <p><b><font size="1">Event ID: 4726</font></b></p>    <p><font size="1">Task Category: User Account Management</font></p>    <p><font size="1">Level: Information</font></p>    <p><font size="1">Keywords: Audit Success</font></p>    <p><font size="1">User: N/A</font></p>    <p><b><font size="1">Computer: 2008-dc2.2008dom.local</font></b></p>    <p><font size="1">Description: <b>A user account was deleted.</b></font></p>    <p><font size="1">Subject:</font></p>    <p><font size="1">Security ID: 2008DOM\Administrator</font></p>    <p><b><font size="1">Account Name: Administrator</font></b></p>    <p><font size="1">Account Domain: 2008DOM</font></p>    <p><font size="1">Logon ID: 0x5fe2d</font></p>    <p><font size="1">Target Account:</font></p>    <p><font size="1">Security ID: S-1-5-21-3841965381-1462996679-2541222053-2111</font></p>    <p><b><font size="1">Account Name: TestUser</font></b></p>    <p><font size="1">Account Domain: 2008DOM</font></p>    <p><font size="1">=========================================================</font></p> </blockquote>  <p><font size="2"></font></p>  <p><font size="2"></font></p>  <p><font size="2">Hope this helps…</font></p>  <p><font size="2"></font></p>  <p><font size="2"></font></p>  <p><font size="2"><strong>- Abizer</strong></font></p>]]></content:encoded>
    </item>
  </channel>
</rss>