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

Using Custom Connectors and Microsoft Graph API's to Manage Licenses in Power Automate - Part Two

Hello again! Didn't I promise you that I'd be back to wrap this up? Well, here I am to give you the second tidbit of information that you need to get this started. If you haven't already, take a look at my previous post where I go into depth about creating a custom connector in Power Automate to retrieve the latest sign-in and also gather the user's licenses. Now that we have the custom connector ready, we can now get into the meat n' potatoes of this series. In this post, I will show you the flow that makes this possible and how you can use the custom connector you have created to tie it all together! Hope you enjoy. Understanding the Logic Before we can begin creating the flow, we should first understand how the flow will work. I designed this to flow to be triggered manually, but you may want to schedule it or use another trigger. The trigger will depend on your organization's policies, so please adjust accordingly. Once triggered, the flow will use the Entra...

Using Custom Connectors and Microsoft Graph API's to Manage Licenses in Power Automate - Part One

Happy June folks! I come to you with another post, but this time I wanted to change it up and show you something else I have just finished working on. As a SysAdmin, one of the most common issues we run into is managing licenses. Working at a post-secondary institution makes this an even greater challenge, as you have both students, staff and faculty constantly coming as well as going. Managing to keep up with this constant change can introduce great administrative overhead which takes away time from important upkeep of other systems and initiatives. You may also notice this same issue in large corporations or in other government organizations. To help combat this, I wanted to create a flow that can do the following: Get the user and their licenses Determine their last sign-in and the date Conditional to determine if the user is past the "cutoff" date Remove the user from a group where the license is assigned The only problem with doing this is that Power Automate does not ha...