Office 365 Profile Completeness: Finding users with no Cell Phone set in the user profile

Office 365 Profile Completeness: Finding users with no Cell Phone set in the user profile

In Office 365, profile completeness is key to multiple cloud experiences. For example, you cannot really do approvals by the manager, if the manager is not set in the user’s profile! Another good example would be a people directory, which would be a bit useless if users don’t have their location and phone numbers filled in! In this series, we will look at how to use PowerShell to create a report of Office 365 Users missing key properties!

Office 365 Profile Completeness: Finding users with no Cell Phone

Office 365 Profile Completeness Series

Finding users with no cell phone set in the user profile

The cell phone is one of the trickiest properties to follow up on in Office 365. One of the main reasons is that the cell-phone is stored inside the user’s Azure AD profile. The SharePoint Online user profile also has a cell phone user property, and they are not synchronized together. This means that even if you see a user’s mobile phone inside Azure AD, you will see it everywhere in Office 365, except SharePoint Online and Delve.

Office 365 Profile Completeness: Finding users with no Cell Phone

There is no out of the box report on Profile Completeness in Office 365, so PowerShell is your best tool in creating reports on user’s profiles! Here is what we will need to get started:


The Script

First thing we are going to do is get our Office 365 credentials, and connect to both Azure Active Directory and the SharePoint Online Admin Center (with the PnP cmdlets)

I will then get all of the users in my tenant, that are internal to the company (Member) and that have at least one license assigned to them.

Since we have two places to check, with users that might have their mobile phone in one, but not the other, we will start checking their Azure AD profile! I will create an empty array, in which we will store all of the users without a cellphone set!

We will then loop trouch each user, and check if their Mobile property is set or not. If not, we will add them to the array, and export them to a CSV file called UsersWithNoCellInAD.csv!

With the AD done, we need to do a very similar thing , but for SharePoint Online! We will loop trough each user, and find out if they have a SharePoint Online Profile or not.   If the profile exists, and the CellPhone property is equal to an empty string, it means the cell phone for this user is not set in SharePoint Online , so we will save the user object in a new array for SharePoint only reporting.

Lastly, we will export the results of the SharePoint results to a CSV file as well!

And here is the full script in one piece!

The Result

The final result is two CSV files, (one for Azure AD and one for SharePoint)  in which we can see the display names and user names of all of the users in our tenant that don’t have a cell phone in their profile! You can either contact them individually, or even Send Email from PowerShell in Office 365 in order to automatically send them a nicely formatted HTML e-mail asking them to fill it!

Office 365 Profile Completeness: Finding users with no Cell Phone

Office 365 Profile Completeness: Finding users with no Cell Phone

More Resources

PowerShell for Office 365 is an essential tool as part of every Office 365’s administrator toolbox. Without PowerShell, you cannot do cool reports such as the one in this blog post, and you are missing out on multiple Office 365 reporting, productivity and security settings. Here are some resources that you could use to learn PowerShell for Office 365:


Books are really ways to learn a topic from start to master, and even if they cost some dollars, they’re always a good investment!

Learn PowerShell for Office 365

Essential PowerShell for Office 365: Managing and Automating Skills for Improved Productivity
Take your Office 365 skills to the next level. Master PowerShell for Office 365 to stay competitive in today’s world of highly sought after cloud management skills. With expert guidance, IT pros will learn how to leverage the muscle of PowerShell to automate many advanced administrative tasks not otherwise accessible in the Office 365 Admin Center. You will discover how to unlock configuration options and automate tasks in order to free up valuable time and resources.

Get it on Amazon at the following links:

Video Training

NOTE: Pluralsight is a paid resource unlike Channel9, Youtube, and Microsoft Virtual Academy which are free. The quality they provide is also superior because of all the quality checks they go through, and the instructors are one of the best in the industry. The Pluralsight courses have a link to where you can get a free trial and decide for yourself if paying a subscription or not is worth it, but the 10 day free trial should allow you to view all those courses for free.

Learn PowerShell for Office 365

PowerShell for Office 365
In this course, you will learn how to use PowerShell to manage Office 365 services. You will learn how to connect and manage users and licensing, SharePoint Online, Exchange Online, Compliance Center and last but not least, Skype for Business Online.

Learn PowerShell for Office 365

PowerShell Playbook for Office 365
A more advanced look at multiple real-life scenarios that span across all Office 365 Services and show you how your PowerShell for Office 365 skills can be applied in your day to day life

PowerShell for common Office 365 Operations
In this 300 level session, you will learn how to automate the management of Office 365 using Windows PowerShell. We will discuss how to connect Windows PowerShell to Office 365, tour the Office 365 cmdlets, and demonstrate how to manage domains, users, and services including Exchange Online, and SharePoint Online.

Support Corner: Using PowerShell to Manage Office 365 Users
Join us in this fast-paced demo to learn how to manage Office 365 users using PowerShell. Experts show you how to create and delete users, update user IDs and passwords, assign licenses and groups, and much more.

Leave a comment and don’t forget to like the Absolute SharePoint Blog Page   on Facebook and to follow me on Twitter here  for the latest news and technical articles on SharePoint.  I am also a Pluralsight author, and you can view all the courses I created on my author page.
5/5 (2)

Please rate this


No comments yet.

Leave a Reply