Automatic user or device affinity in SCCM

sccm user device affinity report

Enabling this allows system center to identify, based upon defined client settings rules, what users primary devices are automatically.


This requires three parts:

– Client policies for the CM Client
– Group Policies to Audit logins
– The Client Deployed to the respective machines and system center to be aware of them

Group Policy Setup:
Create a group policy applied to the machines you’d like auto affinity to work on as follows:

sccm 2012 user device affinity best practice
sccm 2012 user device affinity best practice

 

Note: I applied this to the top of the domain. You may want to be less specific such as only applying this to clients managed by SCCM

 what is user device affinity in sccm 2012

what is user device affinity in sccm 2012

 

Enable Audit Login Events
– Audit Success
– Audit Failure

sccm user device affinity report
sccm user device affinity report

 

Enable Audit Account Login Events:
– Audit Success
– Audit Failure

Automatic user or device affinity in SCCM
Automatic user or device affinity in SCCM

 

Client Policy Setup:
First, Open the Configuration Manager console. Navigate to the Administration workspace and then to the Client Settings node.

Create a custom Client Device Settings Policy “User and Device Affinity”. Specify it to only manage User and Device Affinity settings.

sccm 2012 user device affinity not working
sccm 2012 user device affinity not working

 

User affinity is set up by two variables. The first, minutes, counts how long the user is logged into the machine during the second variable, the days. So if I have it set up to 480 minutes (8 hours) and the days to 7 it won’t flag the user as primary unless they use it for more than 8 hours over a 7-day period.

Best practice is to have the threshold over 7 days to avoid falloff over holiday weekends and vacation time, since it watches for the user to be on a machine more than the threshold, but also watches the user to see if they have fallen below it – when it removes the affinity. Below is how I have set it up for testing. I recommend a higher minute count to avoid users who log in to conference room computers or the like from getting flagged as a primary user of that device.

 System Center Configuration Manager 2012 User Device Affinity

System Center Configuration Manager 2012 User Device Affinity

 

Make sure you set automatically configure user device affinity from usage data to true.

Approval of automatic affinity:

This setup allows you to view what system center configuration manager has deemed a primary user for a device. This should help weed out issues and users who log into multiple machines (such as loaner machines, conference rooms, training computers, etc. – though I’d exclude those from affinity client policies)

In the configuration manager console, go to the Assets and Compliance workspace. From there, Navigate to the Device Collections Node

How to Manage User Device Affinity in Configuration Manager 2012
How to Manage User Device Affinity in Configuration Manager 2012

 

On the ribbon click on Manage Affinity Requests

user device affinity best practices sccm
user device affinity best practices sccm

 

Here you will see automatic requests that system center has generated, along with any request that may have been placed by the user (if you have enabled them to do so through the software center)
You can highlight the users you wish to approve or reject.

 sccm user device affinity report

sccm user device affinity report

 

You can highlight the users you wish to approve or reject.

Verify Affinity is working

How do you know if affinity is working or not? We have logs for that! The log is client-side and called “UserAffinity.log” and within it you can see the evaluation process happening to add or remove affinity of a user to a device.

This is located in C:\windows\CCM\logs\UserAffinity.log on the client machine.

A snapshot of the log on my test machine is as follows:

sccm 2012 primary user report
sccm 2012 primary user report

 

Here you can see it evaluating users based on the settings I previously mentioned.



Note: I have cranked the minutes down to 120 to expedite the affinity process.

Check out Best Alternative to InfoPath -> Try Now

You May Also like the Following SharePoint Online Tutorials:

About Ramu Rao

I have been working as a Team Lead in IT last 6 years with a strong focus on Microsoft Server Technologies I have been working on Windows Server 2008, 2008 R2, 2012 & SCCM 2012 R2 etc. Interested in everything related to Configuration Manager & Windows Azure. Keep learning Keep sharing and keep growing !!

View all posts by Ramu Rao →