Home Self-Service Portal - Community

Display 'Manager' Property of AD User

Nick_FlintNick_Flint Customer Advanced IT Monkey ✭✭✭
Is it possible to display the 'Manager' property for an AD record? I've tried adding it to the RelatedUserInfo.js but using 'Manager' as the property name doesn't work.

Best Answer

Answers

  • Nick_FlintNick_Flint Customer Advanced IT Monkey ✭✭✭

    Thanks, Leigh. The "Line Manger to review" using the created by user is one of the hurdles we're looking to overcome.

    I'm looking to create a PSA to create a review activity with the Affected User's manager as the reviewer once I get time. If anyone your or anyone else has any code they can share to that affect, I'd be very grateful.

  • Leigh_KildayLeigh_Kilday Member Ninja IT Monkey ✭✭✭✭
    edited September 2017
    Our code is tied up in a custom module which I am not allowed to transfer out. The gist of it is:
    • PSA script that gets the Affected User and then invokes a SMA script, passing it the Affected User's UPN.
    • The SMA script queries AD and returns the manager's UPN back to the PSA script.
    • PSA script uses the UPN to return the SCSM user and adds them as a reviewer to any RA with "Manager" in the title.
    The reason I've used the SMA script to get the AD manager is that I need to pass credentials with the query to AD since it counts as a double-hop and needs CredSSP.

    By the way, creating a custom PowerShell module for SCSM is a great idea as it allows you to keep your code in the PSAs to the bare minimum, allowing you to change the content without having to manually refresh every template.
Sign In or Register to comment.