Skip to main content

Using Power Automate to Update Contact Information

 We've all been there- you have a large organization who has out-of-date contact information. What do you do? You could go around to each department and ask them nicely to update their information, or send out an org-wide email prompting people to do so. However, this is tedious and oftentimes a pointless task. By the time you update one department, you're running to fix another. What if you could put the power back in the department's hands to do so? This is a struggle I faced recently as I was trying to find was I could conjure up some updated contact information for each department. As I did my research, I found that I was not alone in this endeavour as it seems that many IT professionals would love to make this process a little bit less painful. With this in mind, I introduce to you my latest flow! This flow will allow you to encourage users to update their contact information, without the overhead that comes with manual effort. In addition to this, this flow utilizes the recently added form functionality that is now incorporated into SharePoint lists! 


Prerequisites

Before we begin, it should be mentioned that you'll probably want to ensure a couple of things are in order before you start implementing this flow. I am going to assume that your environment is a hybrid environment, in which you would like these attributes to also be updated on-premise. If this is the case, read on. If you're strictly cloud, then you can ignore this bit. It is crucial that you ensure that Entra Connect Sync is also synchronizing the following attributes down to your Active Directory:
  • First and Last name
  • Job title and department
  • Business phone number
  • Room number
You can ensure what is being synchronized downstream by following these steps:
  1. Open Microsoft Entra Connect Sync

  2. Launch the Synchronization Rules Editor

  3. Click "Add new rule"

Rule Configuration:

Name

Out to AD - Extended Attributes Writeback

Connected System

Active Directory

Connected System Object Type

User

Metaverse Object Type

Person

Link Type

Join

Precedence

200

Tag

CustomAttributeWriteback

Add Transformations for each attribute:

roomNumber

physicalDeliveryOfficeName

telephoneNumber 

telephoneNumber

Department

Department

Title

Title

givenName

givenName

Surname

sn


Ensure Permissions:

  • Make sure your AD connector account has write permissions

  • Confirm the target OU allows updates

Run Sync:
  • Open PowerShell and execute: Start-ADSyncSyncCycle -PolicyType Initial

Verify:

  • Check user profiles in Active Directory Users and Computers to confirm updates were applied


The List and Form

This part is relatively simple. Create yourself a blank list and ensure the following columns are present:
  • First Name
  • Last Name
  • Department
  • Job Title
  • Room Number
  • Office Phone
You may also be wondering to yourself: why not just get the first and last name automatically? Well here's a simple answer for you: Marriage, Divorce, Separation, etc. which will require you to change your last name, or first depending on how bad (or good it went). The point behind this whole flow is to allow the user to change it to what they require. You may want to automate some of these fields, but I'll leave that to you.

From here, click on the lovely "Forms" button found at the top of the list and begin customizing your form. When this is done, get the link for the form and hold onto it. You'll need it for the email that is sent out to users who do not complete the form.

The Flow

Now that we have the list and attributes ready to rock, or if you're purely cloud and avoided all that mess, we can now get into the nitty gritty of the flow. This is what it looks like from the top down:

I should mention, that I have mine set to manually trigger. You can set this to reoccur as many times as you like, but for testing purposes, I had mine manually trigger instead. I recommend making this a weekly reminder if you can by setting the flow to trigger through the recurrence action.

Here's how the flow works:
  1. The flow is either manually or automatically triggered, depending on how you feel
  2. An Entra connector is used to get group members from a specific group based on the group ID)*
  3. From here, we then get items from a SharePoint list that contains our lovely form
  4. Then for each group member we begin the filtering process. It will check against the group and the SharePoint list in the two "For Each" loops we have created.
  5. A conditional is placed to determine if the group member's submission is in the SharePoint list:
    • If it is not, then an email is sent to the user with a link to the form
    • If it is, then the user is retrieved one more time (for debugging) and then updated. If done correctly, the values should then reflect in Entra ID when we go into the user's properties. If you're in a hybrid setting, now would also be a good time to see if the attributes have trickled downstream to you Active Directory.
* - It is highly recommended that if you're going to run this flow that you do it in a small batch first, then roll out accordingly. Please do not run this against your whole directory unless you're ready to do so.

Conclusion

This is a short and sweet post on how to use Power Automate to automate contact updates. If you liked it, be sure to share it amongst the community, or give it a try yourself. Looking forward to seeing what you'll do with it! You can also download the flow from my GitHub:


test

PIM-IT Ver 0.0.2: More features and Activation Packages

Hello everyone! Hope you're having a great long weekend so far, while I type this I am in my bed with my dog and pushing the latest updates to my GitHub. It's been a minute since I last posted but I wanted to take the opportunity to give you all an update on the PIM-IT project, the PowerShell tool for streamlining Privileged Identity Management. Consider this if you will a changelog of sorts, in which I will talk about the latest features, some takeaways, and what is next in the project. Let's get started! PIM-IT Ver 0.0.2 Latest Features The first major update is the ability to deactivate and update roles. This is a major step towards giving users full control of managing PIM roles from initial activation to deactivation. Updating PIM Roles To update a PIM role, the user selects option "U" from the menu, which will then display currently active roles: From here, the user will select the PIM role they wish to update, which will allow them to adjust the duration to...

Introduction to the PIM-IT Project: Version 0.0.1

Hey everyone! It’s been a while since my last update, but I’m back this Easter weekend to share some exciting work happening behind the scenes. One of my latest projects is PIM-IT , an open-source tool designed to simplify Privileged Identity Management (PIM) in Microsoft Entra . What is PIM? Privileged Identity Management (PIM) helps manage access to roles within Microsoft Entra, ensuring just-in-time access to privileged roles like User Administrator . PIM enhances security by granting access only when needed, for a limited time, under admin-defined conditions. It also helps prevent unauthorized privilege escalation and provides a valuable audit trail. When used correctly, PIM is a powerful tool for managing roles and permissions efficiently. Why PIM-IT? While PIM strengthens security, the process of assigning roles can be tedious—logging into the Azure portal, finding eligible roles, assigning hours, providing justification, and waiting for activation. Now, imagine doing this dai...

Making a SharePoint Knowledge Base Part One: Getting Our Ducks in a Row

Howdy everyone, it's great to be back again for another post! As a matter of fact, this is our very first post on this blog. Amazing! For this post, I am going to help you create an intuitive Knowledge Base in SharePoint that your department or company can use as a whole. We'll also use Power Automate to notify us when our team adds to our Knowledge Base. So with this in mind, let's get started! Why a Knowledge Base? This idea comes from a recent SharePoint migration I did in my own workplace. I wanted to create a centralized resource for our team to find knowledge articles, troubleshooting steps, and guides. This helps us share knowledge across our team as well as with our end-users. For those of you who do not know what a Knowledge Base is, it is as simple as this: A centralized resource to share knowledge and provide self-help to users.  Now that you're privy to what it is, we can begin to build ourselves a Knowledge Base! We'll start with our foundational assets...