<?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>Messagingblogs</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/messagingblogs/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/messagingblogs/feed.xml</link>
    <description>Just another Technet site</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:30:05 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Certificate based authentication - O365</title>
      <link>https://docs.microsoft.com/archive/blogs/messagingblogs/certificate-based-authentication-o365</link>
      <pubDate>Thu, 16 Feb 2017 23:19:51 GMT</pubDate>
      <dc:creator><![CDATA[Ashish Jugran [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/messagingblogs/?p=25</guid>
      <description><![CDATA[This blog provides step by step process to implement Certificate base authentication on Azure AD for...]]></description>
      <content:encoded><![CDATA[This blog provides step by step process to implement Certificate base authentication on Azure AD for iOS and android devices. Certificate base authentication enables iOS and android devices to use user certificate when connecting to Exchange online resources. Supported scenarios are:
<ul>
 	<li>Office mobile applications on mobile devices</li>
 	<li>Exchange ActiveSync clients</li>
</ul>
Certificate base authentication eliminates the need of entering username and password instead require user certificate to access O365 workloads using Microsoft Office applications on mobile devices.

&nbsp;

<strong>Requirement to enable Certificate based authentication for your O365 Tanent</strong>
<ul>
 	<li>Access to certificate authority which generate client certificates in your environment</li>
 	<li>Certificate authority should have CRL (certificate revocation list) which is published on internet</li>
 	<li>Root and intermediate CA certificates</li>
 	<li>User certificate must be issued for client authentication purpose</li>
 	<li>The client certificate must have primary email address in principle name or RFC822 name value of the SAN (Subject Alternate Name)</li>
 	<li>Federation server to be configured with additional claim rules to pass on certificate serial number and issuer</li>
</ul>
&nbsp;

<strong>Installing Azure AD module</strong>
<ol>
 	<li>Start Windows PowerShell with administrator privilege</li>
 	<li>Install Azure AD module version <a href="https://www.powershellgallery.com/packages/AzureAD/2.0.0.33">2.0.0.33 </a>or higher (if not already installed) using below cmdlets</li>
</ol>
Install-Module -Name AzureAD –RequiredVersion 2.0.0.33

Note: - make sure you have PowerShell version 5.0 , verify that by using $psversiontable.psversion cmdlets

<img width="300" height="123" class="alignnone size-medium wp-image-35" alt="powershellversionchk" src="https://msdnshared.blob.core.windows.net/media/2017/02/PowerShellVersionChk-300x123.png" />
<ol start="3">
 	<li>Connect to your Azure AD tenant:</li>
</ol>
Connect-AzureAD

&nbsp;

<b>Configuring your Azure AD tenant for certificate based authentication</b>
<ol>
 	<li>Export Root CA certificate in .cer format</li>
 	<li>Configure your CA details in Azure AD so that Azure AD can validate user certificates and perform revocation check</li>
</ol>
Note: - Verify any existing Trusted CA settings in Azure AD using below cmdlets

Get-AzureADTrustedCertificateAuthority

$Cert=Get-Content -Encoding byte "Location of Root CA CER file"

$New_CA=New-Object -TypeName Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation

$New_CA.AuthorityType=0

$New_CA.TrustedCertificate=$Cert

$New_CA.crlDistributionPoint="CRL Distribution URL"

New-AzureADTrustedCertificateAuthority -CertificateAuthorityInformation $New_CA

<img width="849" height="185" class="alignnone wp-image-45 size-full" alt="2" src="https://msdnshared.blob.core.windows.net/media/2017/02/27.png" />

&nbsp;
<ol start="3">
 	<li>Verify the Azure AD trust configuration:</li>
</ol>
Get-AzureADTrustedCertificateAuthority

<img width="816" height="231" class="alignnone wp-image-55 size-full" alt="3" src="https://msdnshared.blob.core.windows.net/media/2017/02/37.png" />

&nbsp;

<strong>Adding new claims rule for Claims Provider Trust and Relying Party Trusts in ADFS server</strong>
<ol>
 	<li>Login to ADFS server and open ADFS management console</li>
 	<li>Clink on Claims Providers Trusts and select Active Directory from middle pane</li>
 	<li>Choose Edit Claims Rules from Right click Manu or from Actions menu</li>
</ol>
&nbsp;

<img width="775" height="438" class="alignnone wp-image-65 size-full" alt="4" src="https://msdnshared.blob.core.windows.net/media/2017/02/46.png" />

Click on Add Rule

<img width="428" height="499" class="alignnone wp-image-66 size-full" alt="5" src="https://msdnshared.blob.core.windows.net/media/2017/02/56.png" />

Select Claim rule template “Pass Through or Filter an Incoming Claim” and hit Next

<img width="626" height="531" class="alignnone wp-image-75 size-full" alt="6" src="https://msdnshared.blob.core.windows.net/media/2017/02/65.png" />

Define the claim rule name and select Incoming rule type as “Serial Number” from drop down list.  Also select Pass through all claim radio button and click Finish to create the new rule.

<img width="627" height="533" class="alignnone wp-image-85 size-full" alt="7" src="https://msdnshared.blob.core.windows.net/media/2017/02/74.png" />

In the same way add new claim rule for “Issuer” as well. The steps are same except you must choose Incoming claim type as Issuer.

<img width="630" height="528" class="alignnone wp-image-95 size-full" alt="8" src="https://msdnshared.blob.core.windows.net/media/2017/02/81.png" />

&nbsp;

Now we must add these two claims rule for Relying Party Trust i.e. Microsoft Office 365 Identity Platform as well.
<ul>
 	<li>On ADFS management console, click Relying Party Trust and select Microsoft Office 365 Identity Platform from middle pane</li>
 	<li>Choose Edit Claims Rules from Right click Manu or from Actions menu</li>
</ul>
<img width="969" height="614" class="alignnone wp-image-105 size-full" alt="9" src="https://msdnshared.blob.core.windows.net/media/2017/02/92.png" />

Clink on Add Rule

<img width="427" height="496" class="alignnone wp-image-106 size-full" alt="10" src="https://msdnshared.blob.core.windows.net/media/2017/02/105.png" />

Select Claim rule template “Pass Through or Filter an Incoming Claim” and hit Next

<img width="626" height="531" class="alignnone wp-image-115 size-full" alt="11" src="https://msdnshared.blob.core.windows.net/media/2017/02/1111.png" />

Define the claim rule name and select Incoming rule type as “Serial Number” from drop down list. Also select Pass through all claim value radio button and click Finish to create the rule.

<img width="627" height="533" class="alignnone wp-image-125 size-full" alt="12" src="https://msdnshared.blob.core.windows.net/media/2017/02/126.png" />

In the same way add new claim rule for “Issuer” as well. The steps are same except you must choose Incoming claim type as Issuer

<img width="630" height="528" class="alignnone wp-image-135 size-full" alt="13" src="https://msdnshared.blob.core.windows.net/media/2017/02/133.png" />

&nbsp;

<strong>Testing <b>Certificate based authentication</b> to access active sync email profile on iOS Device</strong>

Now to test the CBA on iOS device we have to push certificate and email profile to iOS device from any MDM solution. In my testing, I have used O365 Intune to push certificate profile as well as email profile to my test iOS device.

Once  MDM solution (in my case it is Intune) is ready to manage iOS devices you must enroll iOS device using <a href="https://docs.microsoft.com/en-us/intune/enduser/install-and-sign-in-to-the-intune-company-portal-app-ios">Microsoft Intune Company Portal</a> app on iOS device.  Once the app is installed login to the Company Portal app using your domain credentials and once your are logged in, it should look like this

&nbsp;

<img width="169" height="300" class="alignnone wp-image-145 size-medium" alt="14" src="https://msdnshared.blob.core.windows.net/media/2017/02/142-169x300.png" />          <img width="169" height="300" class="alignnone size-medium wp-image-155" alt="15" src="https://msdnshared.blob.core.windows.net/media/2017/02/152-169x300.png" />

&nbsp;

Once device is enrolled into Intune successfully, you can manage the device from Intune and push Certificate profile, i.e. pushing Root CA certificate as well as client certificate on iOS device. You may verify that on iOS device by going to settings -&gt; General -&gt; Device Management.

&nbsp;

<img width="169" height="300" class="alignnone size-medium wp-image-165" alt="16" src="https://msdnshared.blob.core.windows.net/media/2017/02/163-169x300.png" />          <img width="169" height="300" class="alignnone size-medium wp-image-175" alt="17" src="https://msdnshared.blob.core.windows.net/media/2017/02/172-169x300.png" />

To verify device has got the correct certificates for authentication go to more details in Management Profile on iOS device. You may see couple of certificates. One should be your Root CA certificate and another user certificate for authentication.

&nbsp;

<img width="169" height="300" class="alignnone size-medium wp-image-185" alt="18" src="https://msdnshared.blob.core.windows.net/media/2017/02/182-169x300.png" />

To verify email profile, go to accounts under Device Management Profile and you should see email profile like this.

&nbsp;

<img width="169" height="300" class="alignnone size-medium wp-image-195" alt="19" src="https://msdnshared.blob.core.windows.net/media/2017/02/192-169x300.png" />

Once you verify the Certificate profile and email profile on iOS device you should be ready to access your emails using certificate authentication without entering your username and password. You may also use CBA for all Office mobile applications on iOS device.

&nbsp;

<img width="169" height="300" class="alignnone size-medium wp-image-205" alt="20" src="https://msdnshared.blob.core.windows.net/media/2017/02/203-169x300.png" />

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;]]></content:encoded>
    </item>
  </channel>
</rss>