So we cleaned up our managers in Active Directory, we can now have managers find their direct reports in the Service Manager Self-Service Portal, right? Wrong. Unfortunately Microsoft doesn’t store the manager in the correct format that the portal wants, which is domainnameusername. I really hope Microsoft fixes this in the next version of Service Manager.
So we need to add a token in Service Manager to an unused field so that we can use it in the Portal. Again this is inspired by Anders blog found here.
If you read my previous post you know that unlike Anders example in this environment our managers did not have manager in their title. So I got an CSV export from HR which worked. The export is in the format of:
user SamAccountName, Manager SamAccountName
Here is our runbook.
Once again I will skip initialize data because there is nothing in it. We use the same Read Lines activity from the previous runbook. Point it to our CSV and tell it how many lines to read.
Next we’ll get the Managers in Active Directory. We’ll add a filter for Disabled equals False.
We’ll also add Sam Account Name and set it to read the second field from our subscribed data from the Read Lines activity.
To put this into action, you have to set it in your request offering Select Active Directory user and then Under Configured Criteria select Pager and set Token Portal Username. I will have more on this in a later blog post.
This runbook is provided as an example and is not production ready, please test in your own environment. The runbook is provided as is and without warranty.
The runbook can be downloaded from here
Hi, I’m Billy York. I’m a Consultant at Microsoft, former Cloud and Datacenter Management MVP, specializing in monitoring and automation. Here you’ll find posts about AzureMonitor, LogAnalytics, System Center Operations Manager, Powershell, Hyper-V, Azure Automation, Azure Governance and other Microsoft related technologies.