How to Maintain App Owner Information

Modified on Thu, 13 Jul 2023 at 11:48 AM

TABLE OF CONTENTS


Application Stakeholder Survey

One of the challenges facing of enterprises with large application estates is tracking the progress of their applications. One of our clients discovered that the stakeholder information on each of their applications was either out of date, or in some cases incomplete. Updating the stakeholder information was initially a manual process. After a discussion with one of our consultants, outlining their pain points and challenges, we were able to automate the process using ManagementStudio.

 

Project Briefs

  • IT Contact to be sent email comms to request update of Stakeholder information (To be issued every 6 months). Project team to be CC’d on this email.
  • One email to the App owner with an embedded link to display all their applications that are due for review. 


In this article I'll be going through the steps required to set this up in ManagementStudio. 


Step 1 - Create App Owner Survey

  • Switch to Administration->Applications->Surveys
  • Click New Survey (2)
  • Enter the name of the survey, in this example we have called it Application Owner Survey (3)
  • Configure the Settings panel (4) and also the Display Fields tab (5)

For further information about how to configure Survey panels, please visit:

  • Click Save Changes (6)
  • Make a note of the Survey Id (7)


The screenshot below displays the Application name, the list of stakeholder contacts for the App and a question for the owner to 

confirm the information is correct



 

Step 2 - Create Datamining Report

In this step, we'll be creating a DMR (published to the web) which will contain the applications owned by the contact.

  • Switch to the Applications module->Click on Datamining Report
  • Click Add Reporting Tier-> Select Contact Reporting Tier
  • Select the fields you want displayed in the report from both reporting tiers
  • Click Run Datamining Report
  • This will display all applications in your estate and their corresponding Contacts
  • This report now needs to be filtered to only display Applications that are in the Live process and also those that have a App Owner ContactType status
  • Click Adv. Filter & Sort tab (1)
  • Click Add Column and add Applications_Process and Contacts_ContactType (2) - The below will filter the report to only display applications in the '7. Live' process and apps with ContactType 'Contact' & 'App Owner'
    • Applications_Process = '7. Live' AND 

      (Contacts_ContactType = 'Contact' OR 

      Contacts_ContactType = 'App Owner')

  • Click Run Datamining Report (3)
  • Next we need to create a Web button in the report that will open the survey that was created in step 1



  • Click Add Expression Columns (1)
  • Click Add Web Button (2)
  • Specify the name for the web button (3)
  • Set the Button Type as Survey Button (4)
  • Enter the Survey Id created in step 1 (5)
  • Specify what page you want the survey to open in (6)
  • Click Run Datamining Report (7)
  • Using the Column Layout, Filter, Sort feature, certain columns have been hidden from the final report


  • The final report that will be displayed to the App owner will only have the Application name and a web button displayed as 'Review Application'



  • Click Save
  • Enter the name of the Report (1) and a brief description of the report
  • Ensure you have both Checkboxes checked (2)
    • Publish public Web Url to view report
    • Require secure filter to view Web Url (Auth and Public)
  • Click Save New (3) 

  • Click Menu located at the top left
  • Select Web / Power BI Endpoint (1)
  • Copy the Url (2)
  • Paste this in a notepad



Step 3 - Create Email Template for App Owners

  • Switch to Administration -> User Migrations ->Email templates (1)
  • Click here to add new item (2)
  • Specify the name of the email template, the Category and email subject (3)
  • Click on the Edit symbol (4)



  • Enter the content of the email (1)
  • To ensure that the App Owner only receives a report that displays just the apps they are associated with, we need to add in the following syntax (2)


<a href="URL?filter=&& Contacts_email = '[UM-email]'&fkey=[DmrFilterKey]">Application List</a>
Where URL is the Web Url Endpoint (Anonymous) from the DMR created in Step 2.


  • Click OK (3)
  • Click Save Changes
  • Make a note of the Email Template Id


The below screenshot shows how the email template is rendered to the App Owner

 

 

Step 4 – Create PowerShell Script

Where a user is an app owner for multiple applications, we should ensure that they only receive one email, rather than one per application. That's the purpose of this PowerShell scipt.

  • Switch to Administration ->Applications->PowerShell Scripts (1)
  • Click here to add new item (2) ->Specify the name of the script
  • Specify the Category and Description (3)
  • Click the Edit symbol (4)

A screenshot of a computer

Description automatically generated



  • Enter the following script
  • Amend and specify the contact type to be emailed
  • Amend the Email Template id to match the email id copied from the previous step

    

## Specify the Contact type we need to email
$ContactType = 'UAT'

## Used for Testing Only
##$ScriptArgs.items = @(45449)

## Create User Hash
$Users = (Get-MSDataminingReport -Module UserMigrations -All $true -HeaderFormat PrefixedName -Fields @('Email', 'Id')).data.rows
$Userh = @{}
Foreach($user in $Users){

If($Userh.ContainsKey($User.UserMigrations_Email)){Continue}

$Userh.add($User.UserMigrations_Email, $user.UserMigrations_Id)
}


#### Loop through each app and examine the contacts - then create a distinct list of targets.

## Create Contact Tiew for use in the DM report below
$ConTier = New-MSDataminingTier -Module Contacts -Fields @('ContactId', 'Email') -Options @('Contacts_ContactType')

Foreach($app in $ScriptArgs.items){

$Contacts = ((Get-MSDataminingReport -Module Applications -HeaderFormat PrefixedName -Ids $App -Fields @('Id', 'AppVendor', 'AppName', 'AppVersion') `
-FilterExpression "Contacts_ContactType = '$ContactType'" -AdditionalTiers $ConTier).data.rows)

## Quit this cycle if there are zero contacts
If([string]::IsNullOrWhitespace($contacts)){Continue}

$CustomEmailSubject = "You have applications due for review"

$CustomKeyWords = @()
$CustomKeyWords += @{ Keyword = "[CustomEmailSubject]"; Value = $CustomEmailSubject}

$Targeth = @{}

Foreach($Contact in $Contacts)
{
If($Targeth.ContainsKey($Userh[$Contact.Contacts_Email])){Continue}

$TargetH.add($Userh[$Contact.Contacts_Email], $Userh[$Contact.Contacts_Email])

}

}


## Send the email to the distinct list of people (Contact Type).
Send-MSEmails -Module UserMigrations -ToIds $Targeth.Values -CustomKeyWords $CustomKeyWords -EmailTemplateId 1420 -ScheduleSendAt $(get-date) -DuplicationLookBack 0



  • Click OK
  • Make a note of the Script name


Step 5 - Create ESM Plan

  • Switch to Administration->Applications->ESM Servicing Plans
  • Click Service Plans -> New Service Plan
  • Specify the Name of the Plan e. g Apps Due for Review Send Email
  • Within the Service Plan Rules, the below criteria have been set
    • Check that the Survey is more than 6 months since it was last submitted
    • Check that the Application is in the Live process


  • Within the Service Plan Actions, Click Add New Setting
  • On Publish - Run PowerShell - Enter the name of the PowerShell script created in step 4



  • Click Validate Plan Actions to validate the entries
  • Click Save located at the top left
  • To Test: 
    • Click Run Plan Evaluator - It should find the Applications in the process and also Applications with a Survey completed date more than 6 months ago
    • Click Run Plan Scheduler - It should schedule the Applications that passed the evaluation
    • Click Run Plan Actions - This will run the PowerShell script to find the Users that are recorded as App Owners against the Applications that passed the evaluator. And subsequently trigger the email to these Users that contains the list of Applications 
  • To Schedule this plan to run at set intervals, please refer to this article for more information.


Further Support

If you require further support, please visit ManagementStudio's Service Desk to search the knowledge base or create a new support ticket.