Registering Azure AD devices automatically through PingFederate for Windows 10 devices
Azure AD provides a registered device with an identity and authenticates when the user signs in. Once authenticated, use the device and device attributes to enforce conditional access policies for applications.
The PingFederate server authenticates the user and enrolls the device in Azure. Combined with a mobile device management (MDM) solution such as Microsoft Intune, the device attributes in Azure AD update with additional information about the device. This allows you to create conditional access rules for devices to meet your standards for security and compliance. This configuration also works for Windows Hello for Business.
If you have an on-premise Active Directory environment, you can join your domain-joined devices to Azure AD by configuring hybrid Azure AD-joined devices. You can configure Windows devices to automatically register to Azure AD. Windows current devices use active STS (WS-Trust) workflow for Azure AD device registration. The required configuration differs from Windows down-level devices, which use passive workflow (WS-Federation) for this process.
Azure AD registration process
Azure AD is a Microsoft service that lets you generate attributes to a registered computer object in on-premises Active Directory. This task is an overview of the PingFederate Azure AD registration process.
The automatic registration process with Azure AD is performed in two stages.
Stage 1: Device registration
Processing Steps
-
Using PingFederate and the Kerberos Token Processor, the device authenticates to Azure Device Registration Service (DRS).
-
PingFederate issues a token to Azure AD.
-
Azure AD issues a final token for Azure DRS.
-
A set of attributes pass to Azure AD in the response token and write in the newly created Azure AD device project.
-
Device generates a private/public key pair to use in a certificate signing request (CSR).
-
Azure DRS obtains a certificate that authenticates the device to Azure AD.
-
Device generates another private/public key pair.
-
Newly created key pair binds the PRT to the physical device.
Stage 2: User registration
The main goal of this stage is to obtain a PRT which will be used in the authentication workflows. Depending on the credentials in use, a special plug-in obtains the PRT via separate calls to Azure AD and PingFederate.
Processing Steps
-
Plug-in sends credentials to the PingFederate Username Token Processor endpoint.
-
The PingFederate server authenticates the user and sends back a WS-Trust assertion.
-
Azure AD verifies the token.
-
Azure AD builds a PRT with both user and device attributes.
-
The PRT returns to the Windows device.
Related links
Preparing Azure AD for automatic device registration
Set up a connection to Azure AD, configure the registration CNAME, and enable Azure DRS for automatic device registration.
Before you begin
-
Install PingFederate server running version 8.4 or later
-
Run Office 365 federated domain with appropriate subscriptions
-
Run a functional WS-Federation/WS-Trust connection to Office 365 configured on the PingFederate server
-
Ensure username and Kerberos Token Processors are functional and in use for authenticating Office 365 users.
-
Install Azure AD Connect running for Active Directory synchronization with Azure AD
-
Ensure that you are running the latest version of Azure AD Connect. For more information, see Azure AD Connect
Steps
-
Set up a service connection point using one of the following methods:
Choose from:
-
To configure manually, see the Microsoft product documentation with Configure hybrid Azure AD joined devices manually.
-
To configure using the wizard, see the Microsoft product documentation with Configure hybrid Azure Active Directory join for federated domains.
-
-
Configure the enterprise registration CNAME record on your DNS server. For more information, see the Microsoft product documentation with Create DNS records for O365 using Windows-based DNS
-
Enable Azure Device Registration Service (DRS).
-
Open the Microsoft Azure portal.
-
Go to Azure Active Directory → Devices → Device settings.
-
In the Users may join devices to Azure AD field, click All.
-
In the Users may register their devices with Azure AD field, click All. Click Save.
-
Configuring PingFederate server
Configure the PingFederate server to register Azure Active Directory (AD) Windows 10 devices.
About this task
In the PingFederate cluster, perform the following steps on the admin node:
Steps
-
Add the required attribute namespaces:
-
Stop the PingFederate server.
-
Go to
<pf-install>/pingfederate/server/default/data/config-store
. -
In a text editor, open the
custom-name-formats.xml
file. -
If they are not already present, add the following lines to the
sts-attribute-namespaces
section:<con:item name="http://schemas.microsoft.com/identity/claims">http://schemas.microsoft.com/identity/claims</con:item>; <con:item name="http://schemas.microsoft.com/ws/2012/01">http://schemas.microsoft.com/ws/2012/01</con:item>; <con:item name="http://schemas.microsoft.com/claims">http://schemas.microsoft.com/claims</con:item>;
-
Save your changes and restart the PingFederate server.
-
-
In the PingFederate cluster, open the administrative console and go to Cluster Management → Replicate Cluster Configuration.
-
Click Replicate.
-
Configure Omit line Breaks in Digital Signatures.
For more information see Omit line breaks in digital signatures.
-
In a text editor, open
<pf_install>/pingfederate/bin/run.properties
and add the following line to the file:org.apache.xml.security.ignoreLineBreaks=true
-
Save your changes and restart the PingFederate server.
If you are running a cluster, follow steps 1-4 for all nodes.
-
-
Extend the list of the LDAP binary attributes:
-
Open the PingFederate administrative console and go to Server Configuration → Data Stores.
-
Click LDAP data store.
-
On the LDAP Configuration page, click Advanced.
-
In the Binary Attribute Namefield, enter
objectSid
and click Add. Click Save.
-
-
Confirm the default token type for the WS-Trust protocol:
-
Open the existing Office 365 SP connection.
-
Go to SP Connection → WS-Trust STS → Protocol Settings.
-
In the Default Token Type list, select SAML 1.1 for Office 365. Click Save.
-
-
Extend the WS-Trust attribute contract:
-
Go to SP Connection → WS-Trust STS → Token Creation - Attribute Contract.
-
Add the following attributes and corresponding attribute namespaces.
Attribute name Attribute namespace accounttype
onpremobjectguid
primarysid
SAML_NAME_FORMAT
-
Click Next and then click the Kerberos Token Processor instance.
-
-
Extend the LDAP search for the Kerberos Token Processor:
-
On the Attribute Sources & User Lookup tab, click the LDAP data store instance.
-
On the LDAP Directory Search tab, add the objectSid attribute to return from search. Click Next.
Make sure that Base DN and Search Scope LDAP settings cover both a container with Office 365 users and a container where the AD objects of the devices intended for Azure AD registration are located.
-
On the LDAP Binary Attribute Encoding Types tab, set the Attribute Encoding Type to SID for the objectSid attribute, then click Next.
-
Confirm that the LDAP Filter includes the following:
|((sAMAccountName=${username}) (userPrincipalName=${username}))
-
-
Map the attribute contract to the values of the Kerberos Token Processor instance:
-
Click Done and Next until you reach the Attribute Contract Fulfillmentsection of the Kerberos Token Processor instance.
-
Populate the missing fields, then click Done.
For more information, see Configuring a Kerberos Token Processor instance..
Attribute Contract Source Value Immutable ID
LDAP
objectGUID
TOKEN_SUBJECT
LDAP
objectGUID
UPN
Token
principle
accounttype
Text
DJ
onpremobjectguid
LDAP
objectGUID
primarysid
LDAP
objectSid
SAML_NAME_FORMAT
Text
urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
-
-
Map the attribute contract to the values of the Username Token Processor instance:
-
Click the Username Token Processor instance, then click the Attribute Contract Fulfillment tab.
-
Populate the missing fields.
For more information, see Configuring a Username Token Processor instance..
-
Click Save.
Attribute Contract Source Value Immutable ID
LDAP
objectGUID
TOKEN_SUBJECT
LDAP
objectGUID
UPN
LDAP
userPrincipalName
accounttype
Text
N/A
onpremobjectguid
LDAP
objectGUID
primarysid
Text
N/A
SAML_NAME_FORMAT
Text
urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
-
Controlling deployment and rollout
Configure and restart your Windows 10 device to register with Azure AD.
About this task
Automatic device registration rollout and deployment for the Windows-current devices is done through a Group Policy.
Steps
-
Complete the configuration steps in the Microsoft article Controlled validation of hybrid Azure AD join.
-
Restart the device.
All domain-joined devices running Windows 10 Anniversary Update and Windows Server 2016 or later automatically register with Azure AD at device restart or user sign-in.
Verifying device registration status
Apply the Group Policy and sign in to your Windows 10 device to automatically begin the device registration.
Steps
-
Check the Windows device status using one of the following methods:
Choose from:
-
From a Windows Powershell prompt, run
dsregcmd.exe /status
and confirm the following fields have the corresponding values: -
AzureADJoined: YES
-
DomainJoined: YES
-
WorkplaceJoined: NO
-
WarmDefaultSet: YES
-
AzureADPrt: YES
If you see different values, the device registration process failed. For more information, see Troubleshooting hybrid Azure AD joined devices in the Microsoft Azure product documentation.
-
In the Microsoft Azure portal, go to Azure Active Directory → Devices and verify the device registration status.
-