System Center 2012 Service Manager and Orchestrator Integration Example Walkthrough Start-to-Finish - New Hire Provisioning Service Request

 

NOTE: SINCE POSTING THIS, I HAVE LEARN SOME NEW TRICKS, SO THERE IS NOW A SECOND EDITION OF THIS POST AVAILABLE WHICH REQUIRES MUCH LESS XML EDITING / HACKING ETC, AND ALSO HAS ADDITIONAL TIPS, TRICKS AND GUIDANCE YOU WON'T FIND HERE. SO I'M KEEPING THIS ONE UP FOR REFERENCE BUT IF YOU'RE NEW TO THIS, I STRONGLY RECOMMNED YOU FOLLOW THE SECOND EDITION AVIALABLE HERE: https://blogs.technet.com/b/antoni/archive/2015/10/07/system-center-2012-service-manager-and-orchestrator-integration-example-walkthrough-start-to-finish-new-hire-provisioning-service-request-second-edition.aspx  or https://aka.ms/rubbishsequel :-)

I have been doing a lot of work lately at customers recently (you know who you are Smile) helping them create Service Requests in Service Manager that pass the values into Orchestrator, to allow for some form of automation whether it be machine provisioning, employee onboarding changes etc.

The steps in this blog post  will produce the following end result:

An end user can go into the self-service portal and raise a service request to onboard a new employee.  They provide details of a new employee such as phone number, first name, last name etc. and who their manager will be.  An orchestrator runbook will insert the manager specified into a review activity.  Once the manager approves the review activity, another orchestrator runbook runs, which creates the user in AD, Enables them, Creates a mailbox, adds them to appropriate AD groups and then notifies the manager specified of the new user’s username and password via email.

It is a relatively basic, minimal example, but the idea of this post is to show how all the pieces fit together and how this integration can be achieved, including lots of tips, guidance and best practices along the way.

If this blog helps you or you have any feedback, please leave comments.

Here are the high-level steps required to achieve this scenario:

High-Level Steps

1) Customize Class in Authoring Tool
2) Create Custom Form in Authoring Tool
3) Modify the Type Projection and Add required References to the XML
4) Seal, and Import Extension Management Pack
5) Create the Orchestrator Runbooks
6) Synchronize the Orchestrator Connector in Service Manager
7) Create Runbook Automation Activity Templates
8) Create Review Activity template
9) Create the New Hire Service Request Template and encapsulate the activity templates
10) Create New Service Offering Category, or determine which existing one to use
11) Create New Service Offering, or determine which existing one to use
12) Create Onboarding Request Offering
13) Edit Request Offering XML to replace built-in relationships with custom relationships
14) Populate your Job title List
15) Give Permissions to Offerings on the portal using Catalog Item Groups and User Roles
16) Verify Successful Onboarding of New Users!!

=================================================

Here are the detailed Steps to achieve this scenario:

1) Customize Class in Authoring Tool 

The NewHire Onboarding Scenario used in this post requires entry of values specific for this scenario:

  • NewHire Onboard Salutation
  • NewHire Onboard First Name
  • NewHire Onboard  Initial(s)
  • NewHire Onboard Last Name
  • NewHire Onboard Business Phone
  • NewHire Onboard Cellphone
  • NewHire Onboard Username
  • NewHire Onboard Job Title
  • NewHire Onboard Department
  • NewHire Onboard Site
  • NewHire Onboard Manager
  • NewHire Onboard Mentor

Because the above properties are not provided within the out of the box (OOB) general Service request class, we know that we will need to customize the service request class to add these properties. 

TIP: In some cases you can get away with using the built-in properties that you don’t need as placeholders for your custom properties.  For instance, I see ‘Alternate Contact Method’ used a lot as a placeholder for some kind of custom value.  However in this case as we have 10 properties and 2 relationships we need placeholders for, we definitely need to customize the class.  Even in a scenario where you only have one or two properties you need to add, it still can be better to customize the class so you have a set property in which to store that value, rather than re-using an OOB property that ultimately you may decide to start using for it’s original purpose.

The next question is to consciously decide whether we will use the ‘extend’ or ‘inherit’ option when we get to customizing the class in the authoring tool:

image

As the above properties are specific to this scenario and we don’t want these showing in every service request, (for example it would make no sense to see new hire details in a new VM provisioning SR),  this tells us that we will be using the ‘inherit’ option rather than ‘extend’ option in the authoring tool.

TIP: Use Extend if you want the property extension to show up in EVERY service request already created and that will be created going forward.  Use the ‘Inherit from this class’ option if you are creating properties specific to a given scenario that you don’t want to see in all service requests, but just those for the particular scenario like new hire onboarding.

So here’s how we go about doing this:

1.1) Download the appropriate version of the Authoring tool that corresponds to the version of Service Manager that you have, and install it

2012 RTM - https://www.microsoft.com/en-us/download/details.aspx?id=28726

2012 SP1 - https://www.microsoft.com/en-us/download/details.aspx?id=36214

2012 R2 - https://www.microsoft.com/en-us/download/details.aspx?id=40896

NOTE: If using the R2 version and you have problems installing on the pre-requisite check, try installing the pre-requisites from the SP1 version of the authoring tool, and then running the R2 authoring tool setup. This is the most reliable resolution I have found for this problem in the past.

1.2) Open the Authoring tool (when using the SP1 or R2 version,  you may spot the words ‘service Pack 1 Beta’ in the bottom left of the splash-screen.  Don’t worry about that – we just never got rid of that text in the splash screen after SP1 beta.)

NOTE: If you want to follow along with these steps more closely, ensure your authoring tool layout is similar to the one shown below, and if not, you can choose Window>Reset Windows Layout as shown in this menu:

image

1.3) In the pull down menu choose File>New

1.4) Change the Filename from ManagementPack.GUID (ManagementPack.c8b265d2_f6be_4157_bf2f_62f27131e580) to something more meaningful like ContosoOnboardNewHireMP (Note no spaces or special characters) 

NOTE: I will be storing mine in a directory called C:\Cutomization-Antoniha\ContosoOnboarding\ and I called the mp ContosoOnboardingNewHireMP.  It will be saved as an unsealed mp with the .xml extension – C:\Cutomization-Antoniha\ContosoOnboarding\ContosoOnboardingNewHireMP.xml.

1.5) As we want to extend the service request class, the first thing is to find the Service request class in the sealed MP it is originally defined in. To do this, on the lower right hand side in the class browser, change the dropdown from the name of your management pack to ‘All Management Packs’ (you may have to scroll up to see this ‘All management packs’ option)

1.6) Once ‘All management packs’ is selected, where it says Search, type Service request:

image

1.7) Right-Click Service Request (you may have to click twice) and select View:

image

1.8) You will see the class open up from the Sealed MP it is contained in (System Work item Service request Library) on the left hand side:

image

1.9) Right-click Service Request on the management Pack explorer, and choose ‘Inherit from this class’:

image

1.10) In the ‘Target Management Pack’ dialog, Leave the default of your custom unsealed MP selected, and click OK to store the class customization in there.

1.11) Change ClassInherit_1 to a name such as ContosoOnboardingNewHireSR  (again no spaces here as this is the ID – you can create a more friendly display name in the next steps)

1.12) Now under Class  and ‘Class Name’, you can change ‘inherited from Service Request’ to a more appropriate friendly class name such as ‘Contoso Onboarding New Hire SR’

image

NOTE: For the next step, you may need to rearrange the windows or in my case pull the details window down to see the class properties and relationships:

image

1.13) Scroll all the way to the bottom in the ‘Class Properties and Relationships’ Details pane (should be in the middle), and then you should see a custom property that the authoring tool kindly created for you:

image

NOTE: So guess what I do with that – I promptly delete it Smile.  Reason being is that once you name a property, you can’t change the ID so even if you rename the display name of the property from Property_32 to my COOL NEW PROPERTY, you will be stuck with good old property_35 as the internal name which I don’t like Smile

1.14) So if you agree with the above note, hit the red X on the right, to delete property 35.

1.15) Now we will create the custom properties that we want.  You may vary this (add extra / less properties) and /or use different datatypes for each property depending on your ultimate desired result and how you will use these properties, or how you will need to ultimately manipulate them in service Manager or Orchestrator.

The create property / create relationships buttons can be found just to the lower right of the class description:

image

Use these, together with the details window, to set the custom properties and relationships up as follows:

NOTE: to see the details for the appropriate property click on the property and it’s details will be displayed in the details window

NOTE: down the line you may choose to create some of the strings below that use simple lists as list data types that use MP enumeration fields instead.  Simple Lists are hard-coded when create the request offering.  MP Enumeration Lists are the dropdown lists you see which can be modified via the Library>Lists section of the console. 

Button

Internal Name

Display Name

DataType

Notes

Create Property

NewHireSalutation

New Hire Salutation

String

Will be a simple List in SCSM, populated in the Request Offering prompt configuration

Create Property

NewHireFirstName

New Hire First Name

String

 

Create Property

NewHireInitials

New Hire Initials

String

 

Create Property

NewHireLastName

New Hire Last Name

String

 

Create Property

NewHireBusinessPhone

New Hire Business Phone

String

 

Create Property

NewHireCellPhone

New Hire Cell Phone

String

 

Create Property

NewHireUsername

New Hire Username

String

 

Create Property

NewHireJobTitle

New Hire Job Title

List

After selecting List data type, Choose Create List. Give the List Internal name NewHireContosoJobTitlesList and a display name of New Hire Contoso Job Titles List

Create Property

NewHireDepartment

New Hire Department

String

Will be a simple List in SCSM, populated in the Request Offering prompt configuration

Create Property

NewHireSite

New Hire Site

String

Will be a simple List in SCSM, populated in the Request Offering prompt configuration

Create Relationship

NewHireManager

New Hire Manager

Query Results

Target Class – Active Directory User

Create Relationship

NewHireMentor

New Hire Mentor

Query Results

Target Class – Active Directory User

NOTE: Ultimately this MP will get sealed and therefore the list definition for the job title property will also get sealed.  This means that you will be forced to place your list values in an unsealed MP and I would recommend creating an unsealed MP for holding just the list values (e.g. New Hire Job Title List MP).  More on this can be found in my management pack best practices blogpost

NOTE: Remember to change the target class for the relationships from ‘Object’ to ‘Active Directory User’:

image

NOTE: There is no reason why you cannot create MP Enumeration List fields (like job title) for the properties where I’ve used simple lists here like Site and Department. 

NOTE: Now is a good time to save the MP.  It is always best to save at milestones in the Authoring tool Smile 

1.16) Save and close the Authoring Tool

NOTE: It is good to close it and reopen to ensure that in the next steps where you create your custom form, you are looking at the most recent refreshed version of the MP that has your class customizations, so you can use these in the form.

2) Create Custom Form in Authoring Tool

Now we will also create a customized version of the OOB (Out of the box) Service Request form for this newly customized class, to display all our fields in a separate New Hire Details tab

NOTE: If we don’t create a custom form, all of the properties will show on the ‘Extensions’ tab of the form for this custom New Hire SR class.  However, custom relationship properties (like Manager and Mentor in this example) are not displayed on the extensions tab, so a custom form must be created in order to display the relationship fields.

This is how the end result will (/should Smile) look if you follow the steps below:

image

2.1) Copy this file (installed as part of the Authoring Tool)  to the same folder where you saved the MP:

C:\Program Files (x86)\Microsoft System Center 2012\Service Manager Authoring\Library\ServiceRequest\Microsoft.EnterpriseManagement.ServiceManager.Applications.ServiceRequest.Forms.dll

2.2) Open the MP created in the previous section in the Authoring Tool

NOTE: After you re-open the authoring tool you should see a shortcut to your MP in recent Management Packs, and also a recent option under the File pull-down menu:

image

2.3) Under your new unsealed MP, right click Forms and choose Add Custom

image

NOTE: Rather than starting with a blank empty form (which the Create option will allow you to do), using the ‘Add Custom’ option will allow us to create a customized version of the OOB SR form for our custom SR Class  to meet our needs.

2.4) In the Base Class, search for our custom extended class, select it and click ok:

image

2.5) Give the form an InternalName (with no spaces) such as ContosoOnboardNewHireCustomForm. 

2.6) In Assembly, browse to the location where you copied the Microsoft.EnterpriseManagement.ServiceManager.Applications.ServiceRequest.Forms.dll to (should be the folder you are saving all your MP work)

2.7) In Type choose ServiceRequestForm and then click Create:

image

NOTE): If you’re brand new to the authoring tool, it may be a good idea to ‘rehearse’ your authoring prior to customizing and saving it, as all your edits will be stored in the xml which can potentially make the form take longer to load once the form is imported.   So always good to produce your end customized result in as few clicks as possible.

2.8) Once your new custom form appears, from the Form Customization toolbox on the top right,  drag a new Tab Item onto the form next to the History Tab:

image

NOTE: If you have problems dragging a tab item control on the form – try dragging it from the toolbox to the right of itself,. and then back over to the left onto the form.

2.9) Click on the Tab Item and in the details window context field, give it a new name such as Contoso New Hire Details

image

Next we need to add labels and our custom properties to the form.

NOTE: This is where you had to save and re-open the MP to see the custom properties available for dragging onto the form. 

2.10) Click on the ‘New Hire Details’ tab and then for each property, create a label, by dragging a label control from the toolbox to the white space on the new form.  If you’re following this post exactly you will need 12 labels as we have 12 custom properties.

2.11) Click each label and then in the details window, use the Content field to change what is displayed in each label:

image

2.12) For each property, drag it from the class browser in the bottom-right , next to the respective label on the white space onto the form.

NOTE: the new hire manager and mentor are shown further down with all the other relationships;

image

2.13) Extend and rearrange the text boxes as needed.  You should eventually end up with something like this:

image

NOTE: If you save now, when the form opens in the Service Manager console, it will open on the New Hire Details Tab by default, so follow the next step (2.14) to make a change on the general tab before saving, to ensure the form opens up on the General tab by default:

2.14) Click on the general tab, drag a text box onto the page like this:

image

TIP: I hovered in the orange circle area until I saw the grid lines appear.

This will put the text box here:

image

2.15) Delete the text box from the general tab

2.16) Now save your MP by clicking File>Save All

2.17) Close the Authoring Tool

3) Modify the type projection in the xml

THEORY: (Learnt just this week from my good friend Mr. Richard Usher – a Senior Escalation Engineer in the UK).  Richard asked me today what we’re looking at here:

image

The obvious answer is that we’re looking at a Service Request.  An even better answer I learnt from Rich today was that actually we’re looking at a type projection that brings together the Service Request Class Instance together with relationships.

Therefore a form is not actually based solely on a class, but instead on a type projection.  This is what enables viewing and population of related fields such as Affected User, Assigned to user and the custom manager and mentor relationships in this example.

Therefore, the next thing we need to do prior to sealing and bundling the MP, is create a type projection that combines the custom new hire service request class with any custom relationships that you added.  The type projection needs to contain all OOB relationships, together with your custom relationships in order for the form to open correctly without seeing any errors or exceptions.

In the next steps, we will modify the type projection that was created by the authoring tool, and add the OOB relationships of the Service Request class to the type projection, which should already contain our custom relationships. 

3.1) Create a Backup of your management pack (in a subfolder called backup) in whatever folder you’re working in, as you’re about to do some pretty hefty xml editing that could get hairy.

NOTE: It is better to make a copy in a folder than rename the MP, because the filename of the management pack always needs to match it’s internal ID.  Typically before I manually modify xml, I will create a Backup and modified subfolder, copy the MP into each, and then only edit the one in the ‘modified’ subfolder.

3.2) Once backed up, open your ‘modify’ version of the unsealed MP using your xml / text editor of choice (I often use notepad++)

3.3) Find the type Projection that was created and you should see something like the following with your custom relationships shown:

<TypeProjections>
       <TypeProjection ID="ContosoOnboardNewHireCustomForm_TypeProjection" Accessibility="Public" Type="ContosoOnboardNewHireSR">
         <Component Path="$Context/Path[Relationship='NewHireManager']$" Alias="ComponentAlias_116db1b6_ab87_4109_847c_f97c95f49907" />
         <Component Path="$Context/Path[Relationship='NewHireMentor']$" Alias="ComponentAlias_a8ae523b_df5e_4d7f_ada4_050eb0ab03b4" />
       </TypeProjection>
     </TypeProjections>

As you can see, we need to add the default SR relationships to this type projection.

3.4) Add the OOB Service Request Relationships (shown below) to your type Projection:

          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemAssignedToUser']$" Alias="AssignedTo" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemClosedByUser']$" Alias="ClosedBy" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemCreatedByUser']$" Alias="CreatedBy" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemAffectedUser']$" Alias="AffectedUser" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemRelatesToConfigItem']$" Alias="RelatedConfigItems" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemAboutConfigItem']$" Alias="AboutConfigItem" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemAboutConfigItem' TypeConstraint='System!System.Service']$" Alias="AffectedServices" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemRelatesToWorkItem']$" Alias="RelatedWorkItems">
            <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemAssignedToUser']$" Alias="RelatedWorkItemAssignedTo" />
          </Component>
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemRelatesToWorkItem' SeedRole='Target']$" Alias="RelatedWorkItemSource">
            <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemAssignedToUser']$" Alias="RelatedWorkItemAssignedTo" />
          </Component>
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemHasFileAttachment']$" Alias="FileAttachments">
            <Component Path="$Target/Path[Relationship='SupportingItem!System.FileAttachmentAddedByUser']$" Alias="FileAttachmentAddedBy" />
          </Component>
          <Component Path="$Target/Path[Relationship='CoreKnowledge!System.EntityLinksToKnowledgeDocument']$" Alias="RelatedKnowledgeArticles" />
          <Component Path="$Target/Path[Relationship='Catalog!System.WorkItemRelatesToRequestOffering']$" Alias="RelatedRequestOffering" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemHasActionLog' TypeConstraint='WorkItem!System.WorkItem.TroubleTicket.ActionLog']$" Alias="ActionLog" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemHasCommentLog' TypeConstraint='WorkItem!System.WorkItem.TroubleTicket.AnalystCommentLog']$" Alias="AnalystCommentLog" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemHasCommentLog' TypeConstraint='WorkItem!System.WorkItem.TroubleTicket.UserCommentLog']$" Alias="EndUserCommentLog" />

Once done, the completed Type Projection should look something like this, containing both the OOB Service Request relationships and your custom class relationships:

<TypeProjection ID="ContosoOnboardNewHireCustomForm_TypeProjection" Accessibility="Public" Type="ContosoOnboardNewHireSR">
          <Component Path="$Context/Path[Relationship='NewHireManager']$" Alias="ComponentAlias_116db1b6_ab87_4109_847c_f97c95f49907" />
          <Component Path="$Context/Path[Relationship='NewHireMentor']$" Alias="ComponentAlias_a8ae523b_df5e_4d7f_ada4_050eb0ab03b4" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemAssignedToUser']$" Alias="AssignedTo" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemClosedByUser']$" Alias="ClosedBy" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemCreatedByUser']$" Alias="CreatedBy" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemAffectedUser']$" Alias="AffectedUser" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemRelatesToConfigItem']$" Alias="RelatedConfigItems" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemAboutConfigItem']$" Alias="AboutConfigItem" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemAboutConfigItem' TypeConstraint='System!System.Service']$" Alias="AffectedServices" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemRelatesToWorkItem']$" Alias="RelatedWorkItems">
            <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemAssignedToUser']$" Alias="RelatedWorkItemAssignedTo" />
          </Component>
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemRelatesToWorkItem' SeedRole='Target']$" Alias="RelatedWorkItemSource">
            <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemAssignedToUser']$" Alias="RelatedWorkItemAssignedTo" />
          </Component>
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemHasFileAttachment']$" Alias="FileAttachments">
            <Component Path="$Target/Path[Relationship='SupportingItem!System.FileAttachmentAddedByUser']$" Alias="FileAttachmentAddedBy" />
          </Component>
          <Component Path="$Target/Path[Relationship='CoreKnowledge!System.EntityLinksToKnowledgeDocument']$" Alias="RelatedKnowledgeArticles" />
          <Component Path="$Target/Path[Relationship='Catalog!System.WorkItemRelatesToRequestOffering']$" Alias="RelatedRequestOffering" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemHasActionLog' TypeConstraint='WorkItem!System.WorkItem.TroubleTicket.ActionLog']$" Alias="ActionLog" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemHasCommentLog' TypeConstraint='WorkItem!System.WorkItem.TroubleTicket.AnalystCommentLog']$" Alias="AnalystCommentLog" />
          <Component Path="$Target/Path[Relationship='WorkItem!System.WorkItemHasCommentLog' TypeConstraint='WorkItem!System.WorkItem.TroubleTicket.UserCommentLog']$" Alias="EndUserCommentLog" /></TypeProjection>

3.5) Note the ID of your type Projection, and ensure the form’s target is set to that type projection.

In my case the type projection is called ContosoOnboardNewHireCustomForm_TypeProjection so my first few lines of form xml (further down in the same MP)  should look like this:

<Presentation>
  <Forms>
    <Form ID="ContosoOnboardNewHireCustomForm" Accessibility="Public" Target="ContosoOnboardNewHireCustomForm_TypeProjection" Assembly="Microsoft.EnterpriseManagement.ServiceManager.Applications.ServiceRequest.Forms" TypeName="Microsoft.EnterpriseManagement.ServiceManager.Applications.ServiceRequest.Forms.ServiceRequestForm">
      <Category>Form</Category>

3.6) The final thing to take care of is to make sure your aliases used in the type projection are all included in the references section at the top of the MP. 

For instance, in the section of type projection definition below, the Management Pack alias (identifiable as the string before a !) for the relationship shown below  is SupportingItem!

  <Component Path="$Target/Path[Relationship='SupportingItem!System.FileAttachmentAddedByUser']$" Alias="FileAttachmentAddedBy" />
          </Component>

This means we need to ensure the following reference is included in the reference section at the top of the same management pack:

<Reference Alias="SupportingItem">
       <ID>System.SupportingItem.Library</ID>
       <Version>7.5.2905.0</Version>
       <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
     </Reference>

Most if not all of the references you will need for this example can be copied and pasted from this sample below (You will likely need the bottom 4 – WorkItem, SupportingItem, CoreKnowledge and Catalog if you’ve been following along exactly, as the other ones shown here will already be there):

  <References>
      <Reference Alias="System">
        <ID>System.Library</ID>
        <Version>7.5.8501.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="Console">
        <ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Console</ID>
        <Version>7.5.2905.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="Alias_aacbfa5f_16d7_4b5d_b8df_7319ac77148c">
        <ID>System.WorkItem.ServiceRequest.Library</ID>
        <Version>7.5.2905.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="Alias_8c5d0025_50b2_4a82_a354_ec24dc8b9030">
        <ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Authoring</ID>
        <Version>7.5.2905.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="Alias_7f1db56f_48f0_4a22_b07b_30c030d2237b">
        <ID>Microsoft.Windows.Library</ID>
        <Version>7.5.8501.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="WorkItem">
       <ID>System.WorkItem.Library</ID>
       <Version>7.5.2905.0</Version>
       <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
     </Reference>
     <Reference Alias="SupportingItem">
       <ID>System.SupportingItem.Library</ID>
       <Version>7.5.2905.0</Version>
       <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
     </Reference>
     <Reference Alias="CoreKnowledge">
       <ID>System.Knowledge.Library</ID>
       <Version>7.5.2905.0</Version>
       <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
     </Reference>
     <Reference Alias="Catalog">
       <ID>System.ServiceCatalog.Library</ID>
       <Version>7.5.2905.0</Version>
       <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
     </Reference>
    </References>

NOTE: I used version 7.5.2905.0 as that was the version of all the other MS internal Management packs that were already present.  If the references that are already there are a different version, I suggest changing the version of the other references listed above to match the ones already there.

3.7) Save the Management Pack

3.8) Open the xml file up in Internet Explorer, and ensure it opens as expected with the tags formatted correctly:

image

This will help verify you have no mistakes in the xml.

3.9) Open up the modified xml in the Authoring tool (if you have a problem opening up the MP, it is likely a problem with the xml, so try the above step of opening it up in IE to verify as such.)

NOTE: When there is a syntax problem with the xml and you try opening it in the Authoring tool, the Authoring Tool tends to just ignore your request to open it, without generating any errors or indication that the opening failed.

4) Seal, and Import the Extension Management Pack

The goal now is to create a sealed MP file and then create an MPB (management pack bundle). 

NOTE: We seal the MP for the following reasons:

  • to ensure that this MP will only contain this customization (properties) and other items in the console cannot be added to it.  NOTE: without sealing, you will be forced to store list values for list properties defined in this MP / templates based on this class in the same unsealed MP that has your class customization.  This can be problematic should you want to make a change in the authoring tool later (class/form/properties) and then want to re-import it as it will wipe out changes made in the Service Manager console, since the original import.
  • in order for the customized class and properties to be synchronized to the warehouse, the MP defining the class and properties needs to be sealed.
  • See this blog for more on MP Best Practices

NOTE: It will be necessary in later steps to create a MPB,  because the assembly we used to create the form (Microsoft.EnterpriseManagement.ServiceManager.Applications.ServiceRequest.Forms.dll) needs to be included in with the MP, so we do this by creating the MPB.

NOTE: In order to perform the sealing process, one challenging part of this process can be finding the sn.exe tool, which creates the key we use for sealing the mp:

I got the sn.exe tool from the Windows SDK Download:
sn.exe https://www.microsoft.com/en-us/download/details.aspx?id=8279

The sn.exe is part of the .NET development tools:

clip_image001

sn.exe is typically installed with most Visual Studio installs, so you may be able to find it already out there in your environment somewhere.

4.1) Once you have obtained sn.exe, Run through the following command at a command prompt (navigated to wherever sn.exe is):
sn –k OrgNameKey.snk  

4.2) Use this resultant snk file in the authoring tool to seal your management pack.  To do this, right-click the Management pack name in the Management pack browser and choose ‘Seal management Pack'’

image

4.3) Fill out the fields and click Seal to seal the MP, then close the Seal dialog:

NOTE: remember to change the Output Directory, as by default it is the user profile’s documents directory)

image

NOTE: When you click ‘Seal’ , the most recently saved unsealed .xml version of the MP will be preserved, and it will create a sealed version of the MP (.mp file) in the output directory (which you will likely want to change from the default user profile\documents directory) and automatically increment the version number by 1. 

Our next task is to create the MP bundle.   You can do this using the following commands:

4.4) If not already there, copy the dll to the same directory containing the .MP file, launch powershell on the Service Manager server and run the following commands:

1st Command - Import Service Manager Cmdlets
import-module 'C:\Program Files\Microsoft System Center 2012\Service Manager\Powershell\System.Center.Service.Manager.psd1'

NOTE: You may need to change the above path if this psd1 file is elsewhere.

2nd Command = Specify The target Path and Filename of your output MPB
$mpbpath = "C:\Customization-Antoniha\ContosoOnboarding\afterseal\ContosoOnboardingNewHireMPB.MPB"

3rd Command – Specify the Path and filename of the Sealed MP we just created
$mp1 = "C:\Customization-Antoniha\ContosoOnboarding\afterseal\ContosoOnboardingNewHireMP.mp"

4th Command – Specify the path and file name of the Service Request Assembly (resource)
$r1 = "C:\Customization-Antoniha\ContosoOnboarding\afterseal\Microsoft.EnterpriseManagement.ServiceManager.Applications.ServiceRequest.Forms.dll"

5th command – Bundle the Sealed MP and Assembly as the MPB file
new-scsmmanagementpackbundle -name $mpbpath -Managementpack $mp1 -resource $r1

Following execution of these commands, you should see an MPB in the target file directory you specified in the $mpbath variable:

image

4.5) Navigate to Administration>Management Packs in the Service Manager console, and Import the MPB into SCSM (This is required now so that you will be able to select your custom class in the orchestrator runbooks we will create next):

image

NOTE: When Importing, Be sure to change the filetype to MPB and to select your MPB file rather than the MP or XML:

image

5) Create the Orchestrator Runbooks

We will create Two Orchestrator runbooks that will be used in this example:

Runbook 1 - Add new hires manager as a reviewer to the review activity in the Onboard NewHire Service Request

Runbook 2 - Provision New User

    • Create New User with details supplied in Service Request.
    • Create Random string and set as user’s password
    • Enable New User
    • Creates and Enables Mailbox
    • Adds user to appropriate AD groups
    • Send email to Manager with new hire credentials

NOTE: It is a good idea to at least create and rename the runbook at this point, even if the runbook requires additional configuration / modification.  Tweaking the runbook after all the following steps are complete will not cause problems, but renaming it later could potentially cause problems with the synchronization of the runbook.

NOTE: If you’re new to Orchestrator, there are detailed steps for a couple of the activities below to get you started and familiarized with the UI.   The quickest way I found of creating the runbooks from my steps below were to drag all the activities into the runbook, connect them all up, and then configure each activity.

HEALTH WARNIING: As you may notice, there is no fault tolerance or error handling built into these example runbooks, so I would recommend adding some of these mechanisms (and working with an Orchestrator expert if needed to do this) before implementing in a production environment.

ASSUMPTION: You have configured your Connections inside Orchestrator.  If you have not yet done this, guidance to do it can be found in each integration pack guide.  These will enable orchestrator to connect to the environments it needs to like AD, Service Manager, Exchange etc.

Runbook 1 (Add New Hire Manager as an Approver to a review Activity):

clip_image002

5.1) Open the Orchestrator console.  Create a folder under runbooks or somewhere in your tree called Contoso Onboarding.  Within there, right-click the folder and create two new runbooks.

image

5.2) Create the first runbook that sets the selected new hire’s manager as the reviewer for the review activity.

Configuration of Runbook 1 – Set Approver:

Initialize Data – Activity ID (Runbook Control>Initialize Data):

image

(Detailed steps – from the Runbook control Section (Integration Pack) on the lower right-hand side, drag in an Initialize Data activity, double-click it to open the properties, click Add.  Click Parameter 1 and change it to ActivityID and then click Finish)

Get Object - Get RAA (SC 2012 Service Manager>Get Object):

image

(Detailed steps – from the SC 2012 Service Manager Section (Integration Pack) on the lower right-hand side, drag in a Get Object activity.  Join it up to initialize Data by clicking initialize data, clicking the arrow on the right hand side and dragging from that to the left arrow of the next activity – ‘get object’.  Double-click Get Object to open the properties,  In Connection, choose a connection to the Service Manager environment where you imported the MP that has the class customization we worked on.  In Class, click the dots and choose Runbook Automation Activity.  In the Filters section, click Add,  In the name dropdown select SC Object Guid, leave relation as ‘Equals’.  Right-click in the Value box and choose Subscribe>Published Data.  In the Activity Dropdown, ensure Initialize Data is selected, click AcitivtyID and then OK.  Next right-click Get Object and select rename.  Rename it to Get Object - Get RAA.

The rest of the activities should all be created and renamed as suggested below.  The activity type and integration pack you need for each activity is specified in parentheses after the suggested name for each activity below.  When you’re done, refer to the complete runbook diagram above to verify you have something similar. Where the contents of a field is cut off in the value box, I have used the expand option to display the full contents in the screenshots below

Get Relationship – Related SR (SC 2012 Service Manager>Get Relationship):

NOTE: In this activity, think of the Object Class as the Source and then the Related Class as the Target

image

Get Object – SR Details (SC 2012 Service Manager>Get Object)

image

Get Relationship – Selected Reviewer (SC 2012 Service Manager>Get Relationship)

image

Link between Get Relationship – Selected Reviewer and Get Object – Reviewer:

NOTE: This is really important to configure this, so that the right user is set as the reviewer.  Without doing this, it is possible the affected user / assigned to user would be set as the reviewer in the review activity.  Additionally if you do not narrow this down such that only one user is carried forward, the runbook activities that follow this one will execute multiple times.

image

=============== NOTE THE BELOW SCREENSHOT IS NOT PART OF RUNBOOK

TOP TIP: If you’re unsure of the exact relationship name you need to use here,, you can use the Create Relationship activity as a tool to find the possible relationships:

image

===============BACK TO OUR RUNBOOK CONFIGURATION

Get Object – Reviewer (SC 2012 Service Manager>Get Object)

image

Get Relationship – Related Review Activity (SC 2012 Service Manager>Get Relationship)

image

Get Object – Review Activity (SC 2012 Service Manager>Get Object)

image

NOTE: the Title you set here will be need to be set in the Review activity that you create later in section 8 later.

Create Related Object - Reviewer (SC 2012 Service Manager>Create Related Object)

image

NOTE: Create Related Objects is not to be confused with Create Relationship, which will be used in the next and final activity)

Create Relationship – Set Reviewer (SC 2012 Service Manager>Create Relationship)

image

5.3) Check the runbook in.

Configuration of Runbook 2 – Onboard New User 

NOTE: This runbook uses domain names, user names, AD Groups, account naming conventions and OU container names that are specific to my environment, so be sure to alter things like my fictitious domain name to your own domain name.

5.4) Create the second runbook that performs the onboarding tasks:

image

Initialize Data – Activity ID (Runbook Control>Initialize Data):

image 

Get Object - Get RAA (SC 2012 Service Manager>Get Object):

image 

Get Relationship – Related Onboard SR (SC 2012 Service Manager>Get Relationship):

NOTE: Think of the Object Class as the Source and then the Related Class as the Target

image

Get Object – Onboard SR Details (SC 2012 Service Manager>Get Object)

image

Get Relationship – Get Related AD Users (SC 2012 Service Manager>Get Relationship)

image

Link between Get Related AD Users and Get Object – Manager:

NOTE: This is really important to configure this, to ensure that the manager is the user object that we take from the activity, as we will use this later when setting it in AD and also for sending the email.

NOTE: In runbook testing if you see activities repeat, a common cause is that they are running for more than one object that was returned in the activity prior to the repetition starting.  For instance if I didn’t narrow this down, the following activities would run multiple times for every user returned which could potentially include affected user, create by user etc.

image

Get Object - Get Manager (SC 2012 Service Manager>Get Object)

image

Generate Random Text – Create Password (Utilities>Generate Random Text)

image

Create User (Active Directory>Create User)

image

Enable User (Active Directory>Enable User):

image

Enable Mailbox (Exchange Admin>Enable Mailbox)

image

Compare Values (Utilities>Compare Values):

image

Link between Compare Values and Add to GPS IT group:

image

NOTE: Exclude page is blank

Link between Compare Values and Add to GPS Sales Group:

image

NOTE: Exclude page is blank

Add to GPS IT Group

image

Add to GPS Sales Group:

image

Send Email:

image

image

5.5) Check in this runbook.

6) Synchronize the Orchestrator Connector in Service Manager

6.1) In the Service Manager console, navigate to Administration>Connectors, click on your orchestrator connector and choose Synchronize now in the tasks pane on the right-hand side.

NOTE:   If you don’t have the connector configured yet, steps for creating it can be found here in the TechNet documentation:

6.2) Navigate to Library>runbooks and verify that your runbooks are present and showing with a Status of Active:

image

NOTE: If your runbooks do not appear, these are the most common two problems:

a) The runbook was renamed between syncs and shows in an ‘invalid’ state.  If this happens, delete any runbooks in the library>runbooks node showing with a status of ‘invalid’ or ‘missing’ from Service Manager and re-run the connector

b) You need to run the following truncate command against the orchestrator database as documented here:
TRUNCATE TABLE [Microsoft.SystemCenter.Orchestrator.Internal].AuthorizationCache

7) Create Runbook Automation Activity Templates

7.1) In Library>Runbooks, click on the SetApprover Runbook and then in the tasks pane on the right-hand side, choose Create Runbook Automation Activity Template:

Give the template a name such as Antoni RAA – SetReviewer

NOTE: I use the RAA convention for Runbook Automation Activity templates

NOTE: I would normally store this in my RAA MP following the best practice of storing all elements based on a given class in a custom MP created and used for elements created based on that class. 

However this time, I am following the alternative approach of storing everything custom created in the console related to this scenario in a Contoso Onboard New Hire Custom MP (or a more technically appropriate name may be Contoso Onboard New Hire Console MP as this will contain all elements created via the Service Manager console).  Storing in a scenario MP like this will make the MP more portable between environments.  For example if say I just wanted to implement this particular scenario’s functionality in a different environment – you would just be able to export the single MP and import it into the new environment.  See here for ‘War & Peace’ on MP Best Practice Smile 

image

When specifying the class, this may change the Management Pack to a different one than the one you intend to store in, so be cautious of this and always verify the management pack before clicking OK.

7.2) Check the ‘Is Ready for automation’ checkbox:, and give the RAA a title such as  Contoso Onboarding Runbook Automation Activity to Set Approver

image

NOTE: Do NOT populate a user into the ‘designer’ field on this page as this can cause problems when you try raising the SR containing one of the activities from the Self-Service portal

7.3) On the Runbook tab, click the Edit Mapping button, Expand Object and choose ID, then click Close in the Select Property Mapping box:

image

After step 7.3, the Parameter mapping box, under ActivityID should read ‘mapped to property ID’ instead of the default of ‘Mapped to Property Text1’, so should look like this:

image

7.4) Click OK in the Runbook Automation Activity template to save it

7.5) Create a runbook automation activity template for your Onboard New Hire runbook

image

7.6) Check the Is Ready for automation checkbox and give the RAA a title such as  Contoso Onboarding Runbook Automation Activity to Onboard User

image

7.7) On the Runbook tab, click the Edit Mapping button, expand Object and choose ID.

7.8) Click OK to save the template

8) Create Review Activity template

8.1) In Library>Templates, Create a Review Activity template:

image

NOTE: The same guidance about MP best practice before note 7.1 applies here too.

8.2) Give the template a name such as Contoso – RA – Approve Onboarding

image

8.3) Click OK to open the template

8.4) Give the review Activity the same title that you specified way back in step 5.2:

As a reminder, here is the Get Object – Review Activity (SC 2012 Service Manager>Get Object) Runbook Configuration from earlier:

image

Review Activity Template:

image

8.5) Click ok to save the template

9) Create the New Hire Service Request Template and encapsulate the activity templates

9.1) In Library>Templates, select Create Template

9.2) Give the template a name such as Contoso - SR Onboard New Hire, select your customized SR onboard new hire class and then choose an appropriate management pack.

image

NOTE: The same guidance applies here as described at the start of section 7 in this blog post.

9.3) Click OK To open the template

9.4) Populate the title and any other fields you wish too:

image

9.5) Click the Activities tab

image

9.6) Click the Green Add button just above the Start Green line.

9.7) Select your set approver Runbook Automation Activity and click OK:

image

9.8) Click OK in the Runbook Activity template.

9.9) Click the green add button, select your Review Activity and click OK:

image

9.10) Click OK in the Review Activity template.

9.11) Click the green add button, select your Main onboarding runbook automation activity template and click OK:

9.12) Click OK in the Runbook Automation Activity template.

Your Completed Activities tab should look like this:

image

TIP: If you click the far right ‘views’ button this can often give a more helpful view of the activities displaying the full title:

image

9.13) Click OK in the Template to Save it

10) Create New Service Offering Category, or determine which existing one to use

This diagram shows how Service Offering Categories and Service Offerings are displayed on the portal:

image

Here is the example for this scenario:

image

When you click on a Service Offering, you see a list of request offerings categorized under that Service Offering.

For our scenario we will use a service offering category called HR Systems and a Service Offering called IT Onboarding and a Request Offering called Onboard New Hire To Contoso

So here is how to create the service offering category:

10.1) Navigate to Library Lists and find the Service Offering Category List:

image

10.2) Double click the list and click the Add Item button

If you receive the ‘Select Management Pack’ dialog, I recommend you create a new MP for your service offering category list values called something like ‘Contoso List Values MP – Service Offering Category’.  In this situation, it is not appropriate to choose the Onboard MP because wherever you create any new additional service offering categories they will be stored in whichever MP is selected here the first time round.  Once you initially select a management pack to store list values, you will no longer be prompted which MP to store new values in.  The only way to revert this is to delete all list values created so far and then once you’re back to no custom values and create your first one, you will receive the ‘select management pack’ dialog again.

image

10.3) Click the List Value that appears and then in the Name box, overwrite List Value with HR Systems and click OK.

11) Create New Service Offering Category, or determine which existing one to use

11.1) In the SCSM Console, navigate to Library>Service Catalog>Service Offerings>All Service Offerings

11.2) In the task pane on the right hand side, click Create Service Offering

11.3) In the ‘Before you begin’ page, click next

11.4) In the General Page, give the Service Offering a name such as ‘IT Onboarding’.

11.5) Change the Category from General to the HR Systems category, or whichever category you would like the Service Offering to be displayed under

11.6) Choose the MP to store the Service offering in – I will use Contoso Onboard New Hire Console MP

image

Note there are some partner / community icon packs available which you should be able to find by searching out on the net, should you wish to use these icons.

11.7) Optionally, fill out the Detailed Information fields

11.8) Optionally, add the related business services

11.9) Optionally, add any knowledge articles

11.10) Click Next on the Request Offering page as we do not have the Request Offering yet – we create that in the next section

11.11) In the Publish page, change the Offering Status from Draft to Published

NOTE: a service offering and request offering both have to be in the published status in order for either to approve on the self-service portal.  This is typically the first thing to check in the case where a service offering or request offering unexpectedly does not appear on the portal.

11.12) Click Create and then Close

12) Create Onboarding Request Offering
We will create a Request Offering that prompts for all of the newhire values that we specified when customizing class in the first section above.

12.1) In the Service Manager Console, navigate to Library, Service Catalog>Request Offerings and in the task pane on the right hand side click Create request Offering:

image

12.2) In the general page, give the request offering a title such as Onboard a new Hire to Contoso. 

12.3) Click the ‘select template’ button and select the Custom New Hire Service request template created in section 9 and select a management pack to store the request offering in:

image

NOTE: If you click the Words Select template you will just see Service request templates but if you click the down arrow to the right of select template, it will allow the ability to select a service request template, incident template and create template.

NOTE: I am keeping the request offering in my Contoso Onboard New Hire Console MP as I am storing everything relating to this scenario in this MP.

12.4) On the general page click next to get to the user prompts page

12.5) Optionally enter some form instructions and then add all of the prompts with the appropriate type as shown below, and then click Next:

image

12.6) For each prompt, click the Configure button in the top right of the dialog,  and configure each one as shown below:

image

New Hire’s Desk Phone and New Hire’s Cell Phone:

image

New Hire’s Job title

image

New Hire’s department:

image

New Hire’s Site

image

New Hire Manager / New Hire Mentor – Query Results configuration – Select Class

image

New Hire Manager / New Hire Mentor – Query Results configuration – Configure Criteria

Leave as default with nothing selected:

image

NOTE: This can be used to narrow down the displayed results to a subset.  for example let’s say you needed to only display users with the string ‘manager’ contained in their job title.

New Hire Manager / New Hire Mentor – Query Results configuration – Display Columns

image

New Hire Manager / New Hire Mentor – Query Results configuration – Options

image

NOTE: You can click the same box for both New hire manager and mentor because following creation, we are going to change this option in the xml. 

NOTE: for details on where these related values get stored when checking either of these boxes, please see this post.

When you’re done you should see the ‘All Prompts Configured’ message

image

12.7) Click Next and In the Map Prompts dialog, click Contoso Onboarding Service Request – Contoso Onboarding New Hire SR which should make the custom properties show up:

image

12.8) Map the following prompts by clicking the dropdown in the prompt output column:

image

NOTE: Notice how you do not have to map the manager and mentor fields, as you took care of mapping these by clicking a checkbox in the ‘Options’ page of the Configure Query Results Prompt Configuration.

12.9) Click Next in the Configure Prompts dialog

12.10) Add any desired Knowledge Articles and click Next

12.11) Change the Offering Status from draft to published and click next

image

Click Create and then close

13) Edit Request Offering XML to replace built-in relationships with custom relationships

13.1) Open Powershell and run the following commands to load the smlets and find the relationship Ids for your custom relationships:

1st Command)
import-module 'C:\Program Files\Microsoft System Center 2012\Service Manager\Powershell\System.Center.Service.Manager.psd1'

2nd command)
get-scsmrelationship | where-object {$_.displayname -contains "New Hire Manager"} | ft displayname,id

Result:

DisplayName                                                 Id
-----------                                                 --
New Hire Manager d6e63b5f-c050-755c-1c2c-6088559f18c2

3rd command)
get-scsmrelationship | where-object {$_.displayname -contains "NewHireMentor"} | ft displayname,id

Result:

DisplayName                                                 Id
-----------                                                 --
NewHireMentor 1b4df1d1-72ab-d3a7-3d78-c4049411606c

13.2) Click on Administration>Management Packs

image

13.3) Export the Management Pack that you stored your request offering in.  In my case this is Contoso Onboard New Hire Console MP.  Create a copy of it in a ‘modified’ folder, preserving a backup of it in a ‘backup’ folder.

NOTE: It is better to do this than rename the MP because the filename of the management pack always needs to match it’s internal ID.  Typically before I manually modify xml, I will create a Backup and modified subfolder, copy the MP into each and then only edit the one in the ‘modified’ subfolder.

13.4) Open your unsealed MP create above in your xml / text editor of choice (I often use notepad++)

13.5) Find each prompt and the respective relationship each one is stored to in the xml.  It should look similar to this:

<Source Id="4766ad38-7f97-4e24-8a0b-150eea11301a" Ordinal="11" Prompt="New Hire Manager" ReadOnly="false" Optional="false" ControlType="System.SupportingItem.PortalControl.InstancePicker">
           <ControlConfiguration>
             <Dependencies />
             <AddressableOutputs>
               <AddressableOutput OutputName="DisplayName" OutputType="string" />
             </AddressableOutputs>
             <Configuration>
               <Details IsMultiSelectAllowed="false">
                 <ClassOrProjection Id="10a7f898-e672-ccf3-8881-360bfb6a8f9a" IsProjection="false" />
                 <ViewModelSettings>&lt;SettingsBundle&gt;&lt;ColumnSettings&gt;&amp;lt;ComponentTreeViewItemSettings&amp;gt;&amp;lt;Alias /&amp;gt;&amp;lt;BackgroundColor&amp;gt;&amp;lt;A&amp;gt;0&amp;lt;/A&amp;gt;&amp;lt;R&amp;gt;0&amp;lt;/R&amp;gt;&amp;lt;G&amp;gt;0&amp;lt;/G&amp;gt;&amp;lt;B&amp;gt;0&amp;lt;/B&amp;gt;&amp;lt;ScA&amp;gt;0&amp;lt;/ScA&amp;gt;&amp;lt;ScR&amp;gt;0&amp;lt;/ScR&amp;gt;&amp;lt;ScG&amp;gt;0&amp;lt;/ScG&amp;gt;&amp;lt;ScB&amp;gt;0&amp;lt;/ScB&amp;gt;&amp;lt;/BackgroundColor&amp;gt;&amp;lt;ComponentClassId&amp;gt;10a7f898-e672-ccf3-8881-360bfb6a8f9a&amp;lt;/ComponentClassId&amp;gt;&amp;lt;ChildSettings /&amp;gt;&amp;lt;/ComponentTreeViewItemSettings&amp;gt;&lt;/ColumnSettings&gt;&lt;CriteriaSettings&gt;&amp;lt;ComponentTreeViewItemSettings&amp;gt;&amp;lt;Alias /&amp;gt;&amp;lt;BackgroundColor&amp;gt;&amp;lt;A&amp;gt;0&amp;lt;/A&amp;gt;&amp;lt;R&amp;gt;0&amp;lt;/R&amp;gt;&amp;lt;G&amp;gt;0&amp;lt;/G&amp;gt;&amp;lt;B&amp;gt;0&amp;lt;/B&amp;gt;&amp;lt;ScA&amp;gt;0&amp;lt;/ScA&amp;gt;&amp;lt;ScR&amp;gt;0&amp;lt;/ScR&amp;gt;&amp;lt;ScG&amp;gt;0&amp;lt;/ScG&amp;gt;&amp;lt;ScB&amp;gt;0&amp;lt;/ScB&amp;gt;&amp;lt;/BackgroundColor&amp;gt;&amp;lt;ComponentClassId&amp;gt;10a7f898-e672-ccf3-8881-360bfb6a8f9a&amp;lt;/ComponentClassId&amp;gt;&amp;lt;ChildSettings /&amp;gt;&amp;lt;/ComponentTreeViewItemSettings&amp;gt;&lt;/CriteriaSettings&gt;&lt;/SettingsBundle&gt;</ViewModelSettings>
                 <Columns>
                   <Column Name="DisplayName" Type="string" DisplayName="Display Name" />
                 </Columns>
                 <Criteria />
                 <RelationshipConfiguration AddSelectedItemsAsRelatedItems="true" RelatedItemRelationshipPath="" AffectedItemRelationshipPath="" RelationshipId="D96C8B59-8554-6E77-0AA7-F51448868B43" />
               </Details>
             </Configuration>
           </ControlConfiguration>
           <Targets>
             <Target Path="" OutputName="$InstanceValue$" RelationshipId="D96C8B59-8554-6E77-0AA7-F51448868B43" />
</Targets>

         </Source>
         <Source Id="a3d0cf4a-bb11-4c7b-824d-603d16885dff" Ordinal="12" Prompt="New Hire Mentor" ReadOnly="false" Optional="false" ControlType="System.SupportingItem.PortalControl.InstancePicker">
           <ControlConfiguration>
             <Dependencies />
             <AddressableOutputs>
               <AddressableOutput OutputName="DisplayName" OutputType="string" />
             </AddressableOutputs>
             <Configuration>
               <Details IsMultiSelectAllowed="false">
                 <ClassOrProjection Id="10a7f898-e672-ccf3-8881-360bfb6a8f9a" IsProjection="false" />
                 <ViewModelSettings>&lt;SettingsBundle&gt;&lt;ColumnSettings&gt;&amp;lt;ComponentTreeViewItemSettings&amp;gt;&amp;lt;Alias /&amp;gt;&amp;lt;BackgroundColor&amp;gt;&amp;lt;A&amp;gt;0&amp;lt;/A&amp;gt;&amp;lt;R&amp;gt;0&amp;lt;/R&amp;gt;&amp;lt;G&amp;gt;0&amp;lt;/G&amp;gt;&amp;lt;B&amp;gt;0&amp;lt;/B&amp;gt;&amp;lt;ScA&amp;gt;0&amp;lt;/ScA&amp;gt;&amp;lt;ScR&amp;gt;0&amp;lt;/ScR&amp;gt;&amp;lt;ScG&amp;gt;0&amp;lt;/ScG&amp;gt;&amp;lt;ScB&amp;gt;0&amp;lt;/ScB&amp;gt;&amp;lt;/BackgroundColor&amp;gt;&amp;lt;ComponentClassId&amp;gt;10a7f898-e672-ccf3-8881-360bfb6a8f9a&amp;lt;/ComponentClassId&amp;gt;&amp;lt;ChildSettings /&amp;gt;&amp;lt;/ComponentTreeViewItemSettings&amp;gt;&lt;/ColumnSettings&gt;&lt;CriteriaSettings&gt;&amp;lt;ComponentTreeViewItemSettings&amp;gt;&amp;lt;Alias /&amp;gt;&amp;lt;BackgroundColor&amp;gt;&amp;lt;A&amp;gt;0&amp;lt;/A&amp;gt;&amp;lt;R&amp;gt;0&amp;lt;/R&amp;gt;&amp;lt;G&amp;gt;0&amp;lt;/G&amp;gt;&amp;lt;B&amp;gt;0&amp;lt;/B&amp;gt;&amp;lt;ScA&amp;gt;0&amp;lt;/ScA&amp;gt;&amp;lt;ScR&amp;gt;0&amp;lt;/ScR&amp;gt;&amp;lt;ScG&amp;gt;0&amp;lt;/ScG&amp;gt;&amp;lt;ScB&amp;gt;0&amp;lt;/ScB&amp;gt;&amp;lt;/BackgroundColor&amp;gt;&amp;lt;ComponentClassId&amp;gt;10a7f898-e672-ccf3-8881-360bfb6a8f9a&amp;lt;/ComponentClassId&amp;gt;&amp;lt;ChildSettings /&amp;gt;&amp;lt;/ComponentTreeViewItemSettings&amp;gt;&lt;/CriteriaSettings&gt;&lt;/SettingsBundle&gt;</ViewModelSettings>
                 <Columns>
                   <Column Name="DisplayName" Type="string" DisplayName="Display Name" />
                 </Columns>
                 <Criteria />
                 <RelationshipConfiguration AddSelectedItemsAsRelatedItems="true" RelatedItemRelationshipPath="" AffectedItemRelationshipPath="" RelationshipId="D96C8B59-8554-6E77-0AA7-F51448868B43" />
               </Details>
             </Configuration>
           </ControlConfiguration>
           <Targets>
             <Target Path="" OutputName="$InstanceValue$" RelationshipId="D96C8B59-8554-6E77-0AA7-F51448868B43" />
           </Targets>
         </Source>

NOTE: The Relationship ID you see here is the one that represents the following relationship which has different names depending on where you’re looking at it:

Display Name - Is Related to Configuration Item
Query Results Configuration check box  (In Request Offering)- Add User-selected objects to template object as related items
Service Request Form: Configuration Items: Computers, Services and People
Relationship ID: D96C8B59-8554-6E77-0AA7-F51448868B43

image

image

13.6) Update the relationship ID from the default custom relationship ID to your custom relationship ID.

13.7) In the target Path under the NewHire Manager prompt section, change the relationship ID from D96C8B59-8554-6E77-0AA7-F51448868B43 to the ID for New Hire Manager:

d6e63b5f-c050-755c-1c2c-6088559f18c2

BEFORE:

<Target Path="" OutputName="$InstanceValue$" RelationshipId="D96C8B59-8554-6E77-0AA7-F51448868B43" />
</Targets>

AFTER:

<Target Path="" OutputName="$InstanceValue$" RelationshipId="d6e63b5f-c050-755c-1c2c-6088559f18c2" />
</Targets>

13.8) In the target Path under the NewHire Mentor prompt section, change the relationship ID from D96C8B59-8554-6E77-0AA7-F51448868B43 to the ID for New Hire Manager:

d6e63b5f-c050-755c-1c2c-6088559f18c2

BEFORE:

<Target Path="" OutputName="$InstanceValue$" RelationshipId="D96C8B59-8554-6E77-0AA7-F51448868B43" />
</Targets>

AFTER:

<Target Path="" OutputName="$InstanceValue$" RelationshipId="1b4df1d1-72ab-d3a7-3d78-c4049411606c" />
</Targets>

13.9)  Increment the last digit of the Management Pack Version in both the Identity Section and Category Section of the MP

13.10) Save the Management Pack.

13.11) In Administration>Management Packs, Delete the Contoso Onboard New Hire console MP Management Pack in the console

13.12) Re-import the updated version of the management pack

13.13) Navigate to Library>Service Catalog and Service Offerings, and associate your request offering with the desired Service Offering.  I will associate the ‘Onboard a New Hire to Contoso’ Request Offering with the ‘IT Onboarding’ Service Offering.  ‘IT Onboarding’ is categorized under the ‘HR Systems’ Category. 

14) Populate your Job title List

14.1) Navigate to Library>Lists>New Hire Contoso Job Titles List and double-click the list to update it:

image

14.2) Double click the list and click the Add Item button to add a value:

image

In the ‘Select Management Pack dialog, I recommend you create a new MP for your Job title Department list values called something like ‘Contoso List Values MP – Contoso Job titles’.  Once you initially select a management pack to store list values, you will no longer be prompted which MP to store new values in.  The only way to revert this is to delete all list values created so far and then once you’re back to no custom values and create your first one, you will receive the ‘select management pack dialog again.

14.3) Click the List Value that appears and then in the Name box, overwrite the words ‘List Value’ with a job title and click OK.   Add additional values as desired.

image

Configure Access to Request offering, Using User Roles / Catalog Item Groups.
- ADD RO (and SO if a newly created one) to Catalog Item Group   

15) Give Permissions to Offerings on the portal using Catalog Item Groups and User Roles

Catalog Item Groups (Configured in Library>Groups>Catalog Groups) are used in conjunction with User Roles to determine what End Users see in the end user portal.  Start by creating your Catalog Item group and add the grouping of published request offerings and service offerings to the catalog item group.

In Administration>User Roles create an end user role and add the catalog item group to the User Role.

TIP: You may need to take ‘authenticated Users’ out of the OOB ‘End User’ Role in order for your permissions to take effect

TIP: Permissions are cumulative, so be as granular as possible when creating your catalog item groups (least offerings possible) and grant users/groups to multiple end users catalog item groups as needed

16) Verify Successful Onboarding of New Users!!

16.1) Go to the self-service Portal and raise an Onboarding request.

16.2) Go to work Items>Service Request Fulfillment>All Open Service requests and verify you see your service request.  Open it up and verify the new hire details is populated as expected. If you don’t see your manager and mentor, you may need to revisit section 13 of this blog

image

16.3) Go to activities and you should see that the first activity complete, and then the manager get inserted as the reviewer into the middle review activity

image

Have this user Approve the activity through the portal / console or exchange connector.

Ensure the user was created, properties like phone number, title etc. were updated, the user was added to appropriate groups (sale / IT) and that the manager received an email with the username and password.

You should also see the SR automatically got into the complete status once the final runbook activity has been marked as completed.

Thanks for reading and I hope this helped you!