This isn’t an out of the box solution. This is a bespoke solution that takes a number of elements and puts them together in a unique way. I’m not expecting anyone to implement this specific solution (but you’re more than welcome to) but more to take inspiration from it to implement solutions relevant to your environment(s). This post supports a presentation I presented to The MIM Team User Group on 14 June 2017.
This post describes a solution that;
This is shown graphically below.
The NodeJS WebApp is integrated into the FIM/MIM portal. Bootstrap Typeahead is used to find the user to generate a report on. The Typeahead userlist if fulfilled by an Azure Function into the MIM Sync Metaverse. The Generate Report button fires off a call to FIM/MIM via another Azure Function into the MIM Sync and MIM Service to generate the report.
The returned report opens in a new tab in the users browser. The report contains details of the FIM/MIM connectors the user is represented on.
The values of all attributes for the users hologram from the Metaverse are displayed along with the MA the value came from and the last modified date.
Finally the metadata report from the MIM Service MA Connector Space and the MIM Service.
These are numerous, but I’ve previously posted about them. You will need;
I encourage you to digest those posts to understand how to configure the prerequisites for this solution.
To bring all the individual components together, there are a few additional tasks to enable this solution.
You will need to configure CORS to allow the NodeJS WebApp to access the Azure Functions (from both local and Azure). Reflect your port number if it is different from 3000, and use the DNS name for your Azure WebApp.
Here is a sample HTML file for your NodeJS WebApp with the UI to provide Input for LoginID fulfilled by the NodeJS JavaScript file further below.
The following NodeJS JavaScript supports the HTML UI above. It populates the LoginID typeahead box and takes the Submit Report button to fulfill the report for the desired object(s). Yes if you use the UI to select (individually) multiple different objects all will be returned in their separate output windows.
As the HTML file above indicates you will need to obtain and make available as part of your NodeJS project the typeahead.bundle.js library.
The following Azure Function takes the call from the load of the NodeJS WebApp to populate the typeahead userlist.
Similar in structure to the Username List Lookup Azure Function above, but in the ScriptBlock you embed the Report Generation Script that is detailed here. Modify for what you want to report on.
If you want to display images in your report, you will need to determine if the user has an image during the MV metadata report generation part of the script. Add the following lines (updating for the name of your Image attribute; mine is named EXOPhoto) after the Try {} Catch {} in this section $obj = @() ; foreach ($attr in $attributes.Keys)
# Display the Objects Photo rather than Base64 string if ($attr.equals("EXOPhoto")){ $objectphoto = "<img src=$([char]0x22)data:image/jpeg;base64,$($attributes.$attr.Values.Valuestring)$([char]0x22)>" $val = "System.Byte[]" }
Then in the output of the HTML report at the end of the report generation insert the $objectphoto variable into the HTML stream.
# Output MIM Service Object Data $MIMServiceObjOut = $MIMServiceObjectMetaData | Sort-Object -Property Attribute | ConvertTo-Html -Fragment $htmlreport = ConvertTo-HTML -Body "$htmlcss<h1>Microsoft Identity Manager User Object Report</h1><h2>Query</h2>$sourcequery</br><b><center>$objectphoto</br>NOTE: Only attributes with values are displayed.</center></b><h2>Connector(s) Summary</h2>$connectorsummary<h2>MetaVerse Data</h2>$objectmetadata <h2>MIM Service CS Object Data</h2>$MIMServiceCSobjectmetadata <h2>MIM Service Object Data</h2>$MIMServiceObjOut" -Title "MIM Object Report"
As you can see above I’ve also injected the CSS ($htmlcss) into the output stream at the beginning of the Body section. Somewhere in your script block you will need to define your CSS values. e.g.
# StyleSheet for nice pretty output $htmlcss = "<style> h1, h2, th { text-align: center; } table { margin: auto; font-family: Segoe UI; box-shadow: 10px 10px 5px #888; border: thin ridge grey; } th { background: #0046c3; color: #fff; max-width: 400px; padding: 5px 10px; } td { font-size: 11px; padding: 5px 20px; color: #000; } tr { background: #b8d1f3; } tr:nth-child(even) { background: #dae5f4; } tr:nth-child(odd) { background: #b8d1f3; } </style>"
An interesting solution integrating Azure PaaS Services with Microsoft Identity Manager via PowerShell and the extremely versatile Lithnet FIM/MIM PowerShell Modules.
Please share your implementations enhancing your FIM/MIM Solution.
A few weeks back the Microsoft AI Tour was in Sydney Australia. There was a…
If you're anything like me you always have PowerShell open, and often both PowerShell and…
Decentralised Identity is a technology I'm passionate about and have written many posts and tools…
Over two years ago I authored a PowerShell Module that enabled the automation of 1Password.…
Buried in my PowerShell Snippets Vol 4 post from 2021 is the PowerShell script and…
Short post on how to recovery from "The Windows Subsystem for Linux instance has terminated"…
This website uses cookies.
View Comments