In the last couple of weeks I’ve been evaluating a number of different approaches/concepts for some upcoming MIM development projects. Some of these I’ve blogged about already.
Having an Identity Manager Metaverse with identity data is a key dependency to being able to validate ideas and concepts. So what’s a good source of some interesting and varied identity data with string, integer, reference, and boolean attributes? Twitter? Yeah why not. There’s an API. Should be pretty quick to get some sample data right?
In this blog post I’m going to give an overview of creating a PowerShell Twitter Management Agent to consume Twitter identities and their data into Microsoft Identity Manager. I’ll cover;
Here’s an overview of my approach/rationale of what data I was looking for and how I got it from Twitter;
Here is what a sample of some of the data looks like in the Metaverse.
You need to enable your Twitter Account for API access. Follow the details here
By now you should have downloaded the Twitter PowerShell API Modules and installed them. If you haven’t get WMF5 installed and run the install-module command as shown below in Line 1.
Modify the script below to give the;
….. and let it loose.
Now we have two XML files with a whole bunch of Twitter accounts and their metadata. There is an almost certainty that the seed account you’ve used is both followed by twitter accounts that you also follow. We’re going to need to remove the duplicates so that when we import the Twitter accounts into MIM we don’t have duplicates.
Basic, basic script to read in both files and spit out the unique Twitter Accounts is shown below.
Consuming data into the MIM Sync Engine obtained via PowerShell is quick and simple utilising Søren Granfeldt’s extremely versatile PowerShell Management Agent. I’m just going to cover importing the data from the XML file we generated above.
First up, you can get it from here. Søren’s documentation is pretty good but does assume you have a working knowledge of FIM/MIM and this blog post is no different.
A few items of note are;
Using the guidance above on the Granfeldt PSMA here are the two key scripts for the Twitter MA.
The Schema Script to expose the core Twitter identity attributes.
The Import Script that takes the rationalised XML file created earlier from the friends and followers queries and populates the connector space.
Required by the PSMA but not used as detailed earlier
Required by the PSMA but not used as detailed earlier
Path to the Schema Script in 8.3 format as detailed earlier.
Path to the Import, Export and Password scripts also in 8.3 format.
Select the attributes you want to bring in to the connector space.
Any Join logic, and a Projection Rule.
Import Flow Rules to bring in the Tweeters.
Create your Run Profiles, perform a Stage and Full Sync and BAM; Tweeters in the Metaverse. Real Word Identity Data Ahoy. Exception testing commences now.
Follow Darren on Twitter @darrenjrobinson
Today, I’m super excited to finally announce the Beta release of EntraPulse Lite – a…
I'm excited to share some significant authentication enhancements I've contributed to the Lokka MCP Server…
Last month I had the pleasure of speaking at the Sydney event for Global Azure.…
Model Context Protocol (MCP) is a powerful framework that extends AI clients like Claude and…
I've just completed participating in the Azure AI Developer Hackathon that was looking to provide…
Updated: July 2025 v1.0.2 Fixes issue setting D365SalesGlobals enabling session management for D365 Sales API…
This website uses cookies.