Add a button in to a SharePoint List/Library to trigger a Flow (part 01)

Part 01 (This article)

Microsoft Flow together with PowerApps undoubtedly revolutionizing the process automation in modern work places. You may have a Flow attached to a document library or list but there is no easy access to initiate that flow from the list/library itself. People have to dig in a little bit to initiate it and that’s a little bit of time consuming for constant usage.

clip_image001

With this article, we will find out how we can overcome this struggle using a little bit of JSON stuff (Don’t worry about that word, you don’t need to be a developer here). Using the Modern SharePoint capabilities, we can embed a button right in front of every item in a list or library so that people can trigger a Flow right there. New column formatting is a cool out of the box capability to get this done.

Now let’s get this started. First and foremost, you need to have a Flow created in place and have the GUID of it.

We’ll get a Flow created really quick in case if you don’t have one. If you have a Flow already in place, you can skip these basic steps

Open up your SharePoint Library and click on the “Flow” drop down on the ribbon as below. Then go to “Create a Flow

1

You’ll see a list of available templates. You can utilize these templates if your requirement matches with them. Or simply feel free to create your own. Thankfully, there are a lot of templates published by Microsoft and the community which you can re-use on various scenarios. Unless the requirement is very specific or you are really keen on creating one your own, there is no point of designing a Flow from the scratch.

2

I am adding a simple “Request Manager Approval” flow here. Pretty straight forward.

4

Next, go ahead and check if the flow is added to “My Flows” section. If so, you are good to go.

5

Now go inside the created Flow by clicking on it and copy the highlighted GUID form the address bar of your browser. We need this for our new Button.

6

https://asia.flow.microsoft.com/manage/environments/Default-f50d518a-e13c-4359-85f6-ef76484f4c32/flows/e290feff-0013-41f2-97dd-91a37fb84ea0/details

Now to add the button but before that we need a new column for this button. From the list or library, go to the very end horizontally and add a new text column to this list/library.

10

11

It should be like below after adding. You can edit this view by dragging and dropping the desired column across the library if you wish to. I’m calling mine “Approval” so it makes scenes for a column contains buttons.

a

Now, go ahead and format this column. Click on the little arrow on the newly created column and go to format mode.

b

And paste the JSON code below. replace the GUID using the target flow which you have copied to the clip board.

c

Here’s the code (you will have it provisioned as you go to format mode itself).

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "span",
  "style": {
    "color": "#0078d7"
  },
  "children": [
    {
      "elmType": "span",
      "attributes": {
        "iconName": "Flow"
      }
    },
    {
      "elmType": "button",
      "style": {
        "border": "none",
        "background-color": "transparent",
        "color": "#0078d7",
        "cursor": "pointer"
      },
      "txtContent": "Send to Approval",
      "customRowAction": {
        "action": "executeFlow",
        "actionParams": "{\"id\": \"e290feff-0013-41f2-97dd-91a37fb84ea0\"}"
      }
    }
  ]
}

That’s it and you will immediately notice the button applied to your column. This is how my library looks like after adding the button. It still doesn’t look like a button because of the border, background and colors of it.

14

Cool thing is ! you can customize the button to look like as you want it to be. Further more, you can also make it a logical button which has a condition behind it. (e.g. – show a button only when an item pending for approval).

Read the part 02 of this article series to further customize the button and apply conditions.

Detailed Microsoft article for this is here

DISCLAIMER NOTE: This is an enthusiast post and is not sponsored by Microsoft or any other vendor.

Microsoft Flow in a real world scenario: using Office Quick Parts to fill out documents (Part 01)

Part 01 (This Article)

Yes ! a simple and yet solid Microsoft Flow can be configured to fill-out a Word Document stored in your SharePoint library in conjunction with Quick Parts.

7-AutomationCrosstheNation-1600x900-1600x900

Image Courtesy: brookfieldinstitute

With this blog series, I’m going to demonstrate, how you can utilize legacy and yet famous Office Quick Parts with Microsoft Flow to optimize your content creation!. Well, Quick Parts aren’t new, they have been in Office suite since 2010 but still being famous among content creators due to its usability. 

To get started, you need the following fundamentals:

  • Office 365 subscription with SharePoint, MS Flow Capabilities
  • A document library to store documents
  • Microsoft Office Application Installed in your PC or Mac

Once you have them, simply log in to SharePoint online and open up the desired site. You need a document library to store documents and also relevant fields (metadata) to be created to match our quick parts (Date, Company Name, Project Name etc..).

In my case, I have a simple library with few metadata fields created as below.

A

Following fields in blue, are our quick parts that we will be linking with the SharePoint library fields. They can be belong to a content type (centralized) or a specific to an library, nevertheless we can use quick parts in a document so that anyone can easily fill them out as part of a process.

Today4

Once you have added columns in to the library (much more easier in Modern SharePoint experience!), create a new Word document in that library or if you already have a document, just upload it to the library (just drag and drop). my library is the default “Shared Document” and the columns are “Customer, Project name, Date, Project value”, just four, simple !

Once you have uploaded, open it from Word application as shown below.

Today1

From Word, direct to Insert –> Quick Parts –> Document Property –> Choose the desired field/s

Today2

Here I’m adding Customer field which looks like below once added.

Today3

You have to click on each spot where you want Quick part to be placed and it will insert accordingly. I have added some fields multiple times here which is perfectly fine. Normally, a single field value can be used in various location across a document.

Today4

Changes are usually saved automatically. If you notice the save icon on the top bar of Word Application. So just go ahead and close this now.

Today5

Let’s head back to our library and get started with building the Flow for this scenario. Its easier to work with any office 365 tool nowadays due to the ultimate UI enhancements Microsoft have recently done.

Click on Flow –> Create a flow, from the Library

Today6

You will now be redirected to Flow web site and you must sign in using your O365 account to be able to go ahead from here onwards.

Once you signed in, choose New –> Create from blank from the Microsoft Flow home page. Pretty simple right ?

Today7

Type in “Manual” and hit “Enter” to search. Select the “Manually triggered button” as shown below.

Today8

Next up, we have to choose our SharePoint action. Type in “Get File Content” and select the highlighted action to proceed.

Today9

On the trigger options, Choose appropriate input types to match your fields. Keep in mind that your trigger can be whatever you want it to be, in my scenario, I’m using a manual trigger which is easy for me to demonstrate the use case.

Today12

Now to format our input parameters in the trigger. In my case, I’m adding 4 input types (Date, text and number) according to the Quick Parts I have. You can have more or less, inputs based on your story.

Customer: Text Field | Amount: Number | Doc Date: Date | Project: Text

Today13

Next up, is to configure our 1st SharePoint action to act as we want. we have to bind our SharePoint library to the flow. Choose the site where you have the library from the dropdown. I am using SharePoint because, in this case that’s is where my data resides, but, you can use various other services such as Salesforce, or PowerApps to bring inputs in to the file. The idea of this post is to demonstrate that how data coming from (anywhere) can be automatically entered in to a Word document.

Today10

And select the document library from the listed ones. Leave “Infer Content Type” as Yes as well.

Today11

Now let’s add a new action here. Click on “New” and add the Create File SharePoint action as below.

Today16

This action will update the file properties when the flow is triggered. Select the Site address and folder path (Library). Define the File name by choosing the appropriate fields as you wish. File content should come from the File Content Action itself.

Today17

Once this is done, the Flow so far would look like this. make sure you map the fields properly so you wont have any errors during the first run. A positive first impression is something awesome you know that !!

Today18

Then, click on “New” and search for “Update file properties” SharePoint action from the list to add our next action.

Today19

In here too, we have to configure some parameters to reflect fields and quick parts appropriately. Choose the same site and libraries and Item ID should be “Item ID” from create file. I am using Customer Name field as the title here but its up to you to have your own choice.

Today20

Continue to read part 02

DISCLAIMER NOTE: This is an enthusiast post and is not sponsored by Microsoft or any other vendor.

Find and export list of users with no Skills Defined in Office 365 profile

This is the article 07 in this series.

Having a complete profile in Office365 is not just a benefit for user himself, but for the entire organization which directly impacts on productivity. A finished profile leads to better visibility and eventually results in faster communications across hundreds of thousands of employees in an enterprise setup. Ultimate idea of Office Delve (latest interface of profile comes with more capabilities such as recent activities) is to provide overall insights of a user information and his activities/engagements which makes obvious sense for anyone.

delve

Nevertheless, none of these would be in action unless you have a complete profile with basic details entered in. No matter how much HR would try to push, we still spot a lot of random users who haven’t completed their profiles.

With this short and sweet article series, I’m trying to give you the steps that we followed during the identifying process as requested by our HR. screenshots may differ than our production setup, but you surely will get the point here.

I had to use some PowerShell scripting to get this list out from Office 365 and generate a CSV file for each criteria so that HR can directly reach out to the user via emails and advice to take an action to update the profile on the spot. As a result, we were able to get 100% completeness of profiles across a 5000+ employee organization.

There is no out of the box reporting when it comes to Profile Completeness in Office 365, therefore we have no option other than PowerShell. PowerShell is the ultimate tool for O365 administration, whenever graphical interface has a barrier, hence, make sure you dig around it to understand its capabilities to go beyond.

FINDING USERS WITH NO SKILLS DEFINED IN THEIR PROFILE (This Article)

Defining someone’s skill sets in their profile is vital when it comes to collaboration and team work. It allows others to reach out to the right person on a specific subject. With the Skills field left blank, the organization will not benefit of expertise finder in Office 365.

In this article I’m trying to explain the steps it takes to find out the users who has not set their skills in their Office 365 profile (or simply, delve profile). So here we go, following are the requirements before we get started:

  • Azure AD PowerShell Module – download here
  • Azure AD Administrator Rights
  • SharePoint Online Administrator Rights
  • SharePoint Online PnP Module – download here

Script steps breakdown:

First and foremost, we need to fetch the Office365 credentials and then connect to Azure Active Directory.

$cred = get-Credential

Connect-AzureAD -Credential $cred

Connect-PnpOnline -Url https://mantoso-admin.sharepoint.com/ -Credentials $cred

Then let’s fetch all users in this tenant, who are internal to the company and that have at least one license assigned to them.

$Users = Get-AzureADUser | Where {$_.UserType -eq 'Member' -and $_.AssignedLicenses -ne $null}

Now to create an empty array in which we will later store the output (user list who has not set skills).

$NoSkillsUsers = @()

Now we will dig in through each user, and check if they have a SharePoint Online profile. This is because this property is stored in SharePoint and not in Azure AD account. If a profile exists, I will check their Skills property is filled or not. If not, I will add them to the array I just created in the previous step, and export them to a CSV file called “NoSkillsUsers.csv”. Similar to the ones we did in the previous articles of this series.

foreach ($user in $Users) 
{
    $SPProfile  = Get-PnPUserProfileProperty -Account $user.UserPrincipalName -ErrorAction SilentlyContinue
        if ($SPProfile -ne $null)
        {
          if ($SPProfile.UserProfileProperties.'SPS-Skills' -eq "")
            {
               $NoSkillsUsers += $user
            }
        }
}

And, finally we can export the SharePoint result to a CSV through below part.

$NoSkillsUsers | Select DisplayName, UserPrincipalName | Export-Csv -Path "C:\Tools\Reports\NoSkillsUsers.csv" -NoTypeInformation

If you need to obtain a similar report on other user criteria’s, here are the other articles of this series which would help you to achieve it.

  1. Find and export list of users with no Manager Name set in Office 365 profile:
  2. Find and export list of users with no Manager Name set in Office 365 profile:
  3. Find and export list of users with no Profile Picture set in Office 365 Account:
  4. Find and export list of users with no Birthday set in Office 365 profile:
  5. Find and export list of users with no Country set in Office 365 Profile:
  6. Find and export list of users with no Department set in Office 365 Profile:
  7. Find and export list of users with no Skills Defined in Office 365 profile:
  8. Find and export the list of users who has not completed About Me section in their Office 365 profile

DISCLAIMER NOTE: This is an enthusiast post and is not sponsored by Microsoft or any other vendor.

Find and export list of users with no Department set in Office 365 profile

This is the article 06 in this series.

Having a complete profile in Office365 is not just a benefit for user himself, but for the entire organization which directly impacts on productivity. A finished profile leads to better visibility and eventually results in faster communications across hundreds of thousands of employees in an enterprise setup. Ultimate idea of Office Delve (latest interface of profile comes with more capabilities such as recent activities) is to provide overall insights of a user information and his activities/engagements which makes obvious sense for anyone.

delve

Nevertheless, none of these would be in action unless you have a complete profile with basic details entered in. No matter how much HR would try to push, we still spot a lot of random users who haven’t completed their profiles.

With this short and sweet article series, I’m trying to give you the steps that we followed during the identifying process as requested by our HR. screenshots may differ than our production setup, but you surely will get the point here.

I had to use some PowerShell scripting to get this list out from Office 365 and generate a CSV file for each criteria so that HR can directly reach out to the user via emails and advice to take an action to update the profile on the spot. As a result, we were able to get 100% completeness of profiles across a 5000+ employee organization.

There is no out of the box reporting when it comes to Profile Completeness in Office 365, therefore we have no option other than PowerShell. PowerShell is the ultimate tool for O365 administration, whenever graphical interface has a barrier, hence, make sure you dig around it to understand its capabilities to go beyond.

FINDING USERS WITH NO DEPARTMENT SET IN THEIR PROFILE (This Article)

In this article I’m trying to explain the steps it takes to find out the users who has not set the relevant department in their Office 365 profile (or simply, delve profile).

So here we go, following are the requirements before we get started:

  • Azure AD PowerShell Module – download here
  • Azure AD Administrator Rights

Script steps breakdown:

First and foremost, we need to fetch the Office365 credentials and then connect to Azure Active Directory.

$cred = get-Credential
Connect-AzureAD -Credential $cred

Then let’s fetch all users in this tenant, who are internal to the company and that have at least one license assigned to them.

$Users = Get-AzureADUser | Where {$_.UserType -eq 'Member' -and $_.AssignedLicenses -ne $null}

Now to create an empty array in which we will later store the output (user list who has not set a mobile)

$NoDepUsers = @()

Now we will dig in through each user, and check if their Department property is filled or not. If not, I will add them to the array I just created in the previous step, and export them to a CSV file called “NoDepUsers.csv”. Similar to the ones we did in the previous articles of this series.

foreach ($user in $Users) 
{
    if ($user.Department -eq $null)
    {
        $NoDepUsers += $user
    }
}

And, finally we can export the SharePoint result to a CSV through below part.

$NoDepUsers | Select DisplayName, UserPrincipalName | Export-Csv -Path "C:\Tools\Reports\NoDepUsers.csv" -NoTypeInformation

If you need to obtain a similar report on other user criteria’s, here are the other articles of this series which would help you to achieve it.

  1. Find and export list of users with no Manager Name set in Office 365 profile:
  2. Find and export list of users with no Manager Name set in Office 365 profile:
  3. Find and export list of users with no Profile Picture set in Office 365 Account:
  4. Find and export list of users with no Birthday set in Office 365 profile:
  5. Find and export list of users with no Country set in Office 365 Profile:
  6. Find and export list of users with no Department set in Office 365 Profile:
  7. Find and export list of users with no Skills Defined in Office 365 profile:
  8. Find and export the list of users who has not completed About Me section in their Office 365 profile

DISCLAIMER NOTE: This is an enthusiast post and is not sponsored by Microsoft or any other vendor.

Find and export list of users with no Country set in Office 365 Profile

This is the article no 05 in the series.

Having a complete profile in Office365 is not just a benefit for user himself, but for the entire organization which directly impacts on productivity. A finished profile leads to better visibility and eventually results in faster communications across hundreds of thousands of employees in an enterprise setup. Ultimate idea of Office Delve (latest interface of profile comes with more capabilities such as recent activities) is to provide overall insights of a user information and his activities/engagements which makes obvious sense for anyone.

clip_image001_thumb2_thumb[3]

Nevertheless, none of these would be in action unless you have a complete profile with basic details entered in. No matter how much HR would try to push, we still spot a lot of random users who haven’t completed their profiles.

With this short and sweet article series, I’m trying to give you the steps that we followed during the identifying process as requested by our HR. screenshots may differ than our production setup, but you surely will get the point here.

I had to use some PowerShell scripting to get this list out from Office 365 and generate a CSV file for each criteria so that HR can directly reach out to the user via emails and advice to take an action to update the profile on the spot. As a result, we were able to get 100% completeness of profiles across a 5000+ employee organization.

There is no out of the box reporting when it comes to Profile Completeness in Office 365, therefore we have no option other than PowerShell. PowerShell is the ultimate tool for O365 administration, whenever graphical interface has a barrier, hence, make sure you dig around it to understand its capabilities to go beyond.

FINDING USERS WITH NO COUNTRY SET IN THEIR PROFILE (This Article)

In this article I’m demonstrating the steps it takes to find out the users who has not set their relevant country in Office 365 profiles (or simply, delve profile). This isn’t sort of a blog I wanted to write but since this daily requests comes from HR to find users (not criminals though !), this might be a common case in most places and why not write down the steps right?

So here we go, following are the requirements before we get started. Make sure you setup your environment with these:

First and foremost, we need to fetch the Office365 credentials and then connect to Azure Active Directory.

$cred = get-Credential
Connect-AzureAD -Credential $cred
Then let’s fetch all users in this tenant, who are internal to the company and that have at least one license assigned to them.

$Users = Get-AzureADUser | Where {$_.UserType -eq 'Member' -and $_.AssignedLicenses -ne $null}
Now to create an empty array in which we will later store the output (user list who has not set the relevant Country)

$NoCountryUsers = @()

Now we will dig in through each user, and check if they have any value set in their Azure AD user profile. If not, we will save them in to the array we crated. And then finally export these set of users in to a CSV file called “NoCountryUsers.csv“.

foreach ($user in $Users)
{
    if ($user.Country -eq $null)
    {
        $NoCountryUsers += $user
    }
}
And, finally we can export the SharePoint result to a CSV through below part. This line will save the data that we extracted and stored in the array we created as “NoCountryUsers
$NoCountryUsers | Select DisplayName, UserPrincipalName | Export-Csv -Path "C:\Tools\Reports\NoCountryUsers.csv" -NoTypeInformation
 
DISCLAIMER NOTE: This is an enthusiast post and is not sponsored by Microsoft or any other vendor.

 

 

 

Find and export list of users with no Profile Picture set in Office 365 Account

This is the article no 04 in the series

Having a complete profile in Office365 is not just a benefit for user himself, but for the entire organization which directly impacts on productivity. A finished profile leads to better visibility and eventually results in faster communications across hundreds of thousands of employees in an enterprise setup. Ultimate idea of Office Delve (latest interface of profile comes with more capabilities such as recent activities) is to provide overall insights of a user information and his activities/engagements which makes obvious sense for anyone.

clip_image001_thumb2_thumb[3]

Nevertheless, none of these would be in action unless you have a complete profile with basic details entered in. No matter how much HR would try to push, we still spot a lot of random users who haven’t completed their profiles.

With this short and sweet article series, I’m trying to give you the steps that we followed during the identifying process as requested by our HR. screenshots may differ than our production setup, but you surely will get the point here.

I had to use some PowerShell scripting to get this list out from Office 365 and generate a CSV file for each criteria so that HR can directly reach out to the user via emails and advice to take an action to update the profile on the spot. As a result, we were able to get 100% completeness of profiles across a 5000+ employee organization.

There is no out of the box reporting when it comes to Profile Completeness in Office 365, therefore we have no option other than PowerShell. PowerShell is the ultimate tool for O365 administration, whenever graphical interface has a barrier, hence, make sure you dig around it to understand its capabilities to go beyond.

FINDING USERS WITH NO PROFILE PICTURE SET IN THEIR PROFILE (This Article)

Profile picture on a name helps recognizing coworkers easily among thousands of other people in a organization. Not setting a picture in a profile would not look nice as it reflects to most of the productivity, communication and collaboration apps such as  SharePoint Online, Delve, Teams and Exchange. A gray sample placeholder like below, is not suitable for a corporate setup and not the optimal experience, so let’s find out how we can fetch such users so our HR can alert them to take action.

ProfilePic

In this article I’m trying to explain the steps it takes to find out the users who has not set Profile Picture in Office 365 accounts. This isn’t sort of a blog I wanted to write but since this daily requests comes from HR to find users (not criminals though !), this might be a common case in most places and why not write down the steps right?

So here we go, following are the requirements before we get started. Make sure you setup your environment with these:

  • Azure AD Administrator
  • Exchange Online Administrator
  • AzureAD PowerShell Module
  • Exchange Online PowerShell Module (only if MFA in use)

Script steps breakdown:

First and foremost, we need to fetch the Office365 credentials and then connect to Azure Active Directory and the Exchange Online.

$cred = get-Credential
Connect-AzureAD -Credential $cred
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $cred -Authentication Basic -AllowRedirection
Import-PSSession $Session

Then let’s fetch all users in this tenant, who are internal to the company and that have at least one license assigned to them.

$Users = Get-AzureADUser | Where {$_.UserType -eq 'Member' -and $_.AssignedLicenses -ne $null}
Now to create an empty array in which we will later store the output (user list who has not set a Picture)

$NoPicUsers = @()

Now we will dig in through each user, and check if they have set a picture as part of their profile.If not we will add that user in the newly created array. and Then lastly we will export these set of users in to a CSV file called “NoPicUsers.csv“.

foreach ($user in $Users)
{
    $Picture = Get-UserPhoto -Identity $user.UserPrincipalName -ErrorAction SilentlyContinue
    if ($Picture -eq $null)
    {
        $NoPicUsers += $user
    }
}

And, finally we can export the SharePoint result to a CSV through below part. This line will save the data that we extracted and stored in the array we created as “NoPicUsers

$NoPicUsers | Select DisplayName, UserPrincipalName | Export-Csv -Path "C:\Tools\Reports\NoPicUsers.csv" -NoTypeInformation

DISCLAIMER NOTE: This is an enthusiast post and is not sponsored by Microsoft or any other vendor.

Find and export list of users with no Birthday set in Office 365 profile

This is the article 03 in the series.

Having a complete profile in Office365 is not just a benefit for user himself, but for the entire organization which directly impacts on productivity. A finished profile leads to better visibility and eventually results in faster communications across hundreds of thousands of employees in an enterprise setup. Ultimate idea of Office Delve (latest interface of profile comes with more capabilities such as recent activities) is to provide overall insights of a user information and his activities/engagements which makes obvious sense for anyone.

clip_image001_thumb2

Nevertheless, none of these would be in action unless you have a complete profile with basic details entered in. No matter how much HR would try to push, we still spot a lot of random users who haven’t completed their profiles.

With this short and sweet article series, I’m trying to give you the steps that we followed during the identifying process as requested by our HR. screenshots may differ than our production setup, but you surely will get the point here.

I had to use some PowerShell scripting to get this list out from Office 365 and generate a CSV file for each criteria so that HR can directly reach out to the user via emails and advice to take an action to update the profile on the spot. As a result, we were able to get 100% completeness of profiles across a 5000+ employee organization.

There is no out of the box reporting when it comes to Profile Completeness in Office 365, therefore we have no option other than PowerShell. PowerShell is the ultimate tool for O365 administration, whenever graphical interface has a barrier, hence, make sure you dig around it to understand its capabilities to go beyond.

FINDING USERS WITH NO BIRTHDAY SET IN THEIR PROFILE (This Article)

Birthday

In this article I’m trying to explain the steps it takes to find out the users who has not set their Birthdays in Office 365 profiles (or simply, delve profile). This isn’t sort of a blog I wanted to write but since this daily requests comes from HR to find users (not criminals though !), this might be a common case in most places and why not write down the steps right?

So here we go, following are the requirements before we get started. Make sure you setup your environment with these:

Script steps breakdown:

First and foremost, we need to fetch the Office365 credentials and then connect to Azure Active Directory and the SharePoint Online Admin Center with the PnP cmdlets.

$cred = get-Credential
Connect-AzureAD -Credential $cred
Connect-PnpOnline -Url https://mantoso-admin.sharepoint.com/ -Credentials $cred

Then let’s fetch all users in this tenant, who are internal to the company and that have at least one license assigned to them.

$Users = Get-AzureADUser | Where {$_.UserType -eq 'Member' -and $_.AssignedLicenses -ne $null}

Now to create an empty array in which we will later store the output (user list who has not set Birthday).

$NoBDUsers = @()

Now we will dig in through each user, and check if they have a SharePoint online profile as this property is stored in SharePoint, not in Azure AD. If profile is available and the SP-Birthday property is null, it simply means the particular user have not set the birthday. Then lastly we will export these set of users in to a CSV file called “NoBDUsers.csv“.

foreach ($user in $Users) 
{
    $SPProfile  = Get-PnPUserProfileProperty -Account $user.UserPrincipalName -ErrorAction SilentlyContinue
        if ($SPProfile -ne $null)
        {
          if ($SPProfile.UserProfileProperties.'SPS-Birthday' -eq "")
            {
               $NoBDUsers += $user
            }
        }
}

And, finally we can export the SharePoint result to a CSV through below part. This line will save the data that we extracted and stored in the array we created as “NoBDUsers

$NoBDUsers | Select DisplayName, UserPrincipalName | Export-Csv -Path "C:\Tools\Reports\NoBDUsers.csv" -NoTypeInformation

If you need to obtain a similar report on other user criteria’s, here are the other articles of this series which would help you to achieve it.

  1. Find and export list of users with no Manager Name set in Office 365 profile:
  2. Find and export list of users with no Manager Name set in Office 365 profile:
  3. Find and export list of users with no Profile Picture set in Office 365 Account:
  4. Find and export list of users with no Birthday set in Office 365 profile:
  5. Find and export list of users with no Country set in Office 365 Profile:
  6. Find and export list of users with no Department set in Office 365 Profile:
  7. Find and export list of users with no Skills Defined in Office 365 profile:
  8. Find and export the list of users who has not completed About Me section in their Office 365 profile

DISCLAIMER NOTE: This is an enthusiast post and is not sponsored by Microsoft or any other vendor.

Find and export list of users with no Manager Name set in Office 365 profile

This is the article no 02 in this series.

Having a complete profile in Office365 is not just a benefit for user himself, but for the entire organization which directly impacts on productivity. A finished profile leads to better visibility and eventually results in faster communications across hundreds of thousands of employees in an enterprise setup. Ultimate idea of Office Delve (latest interface of profile comes with more capabilities such as recent activities) is to provide overall insights of a user information and his activities/engagements which makes obvious sense for anyone.

clip_image001_thumb2

Nevertheless, none of these would be in action unless you have a complete profile with basic details entered in. No matter how much HR would try to push, we still spot a lot of random users who haven’t completed their profiles.

With this short and sweet series of articles, I’m trying to give you the steps that I followed during the identifying process as requested by one of my client’s HR team. screenshots may differ than our production setup, but you surely will get the point here.

I had to use some PowerShell scripting to get this list out from Office 365 and generate a CSV file for each criteria so that HR can directly reach out to the user via emails and advice to take an action to update the profile on the spot. As a result, we were able to get 100% completeness of profiles across a 5000+ employee organization.

There is no out of the box reporting when it comes to Profile Completeness in Office 365, therefore we have no option other than PowerShell. PowerShell is the ultimate tool for O365 administration, whenever graphical interface has a barrier, hence, make sure you dig around it to understand its capabilities to go beyond.

FINDING USERS WITH NO MANAGER NAME SET IN THEIR PROFILE (This Article)

Setting Manager property in the user profile is important as it reflects to Organization Chart and Workflow Steps where Manager property is fetched and Many other productivity features of Office 365 which are daily utilized. Therefore, its not a good idea to keep it empty !

OrgChart

In this article I’m showing you how to extract the users who has not set manager’s name in their Office 365 profile (or simply, delve profile). This isn’t sort of a blog I wanted to write but since this daily requests comes from HR to find users (not criminals though !), this might be a common case in most places and why not write down the steps right?

So here we go, following are the requirements before we get started:

Script steps breakdown:

First and foremost, we need to fetch the Office365 credentials and then connect to Azure Active Directory and the SharePoint Online Admin Center with the PnP cmdlets.

$cred = get-Credential
Connect-AzureAD -Credential $cred
Then let’s fetch all users in this tenant, who are internal to the company and that have at least one license assigned to them.

$Users = Get-AzureADUser | Where {$_.UserType -eq 'Member' -and $_.AssignedLicenses -ne $null}

Now to create an empty array in which we will later store the output (user list who has not set a mobile)

$NoMNGUsers = @()
Now we will dig in through each user, and check if their Manager property is filled or not. If not, I will add them to the array I just created in the previous step, and export them to a CSV file called “NoMNGUsers.csv”. Sounds great right !
foreach ($user in $Users)
{
    $Manager = Get-AzureADUserManager -ObjectId $user.UserPrincipalName
    if ($Manager -eq $null)
    {
        $NoMNGUsers += $user
    }
}

And, finally we can export the result set to a CSV through below part.

$NoManagerUsers | Select DisplayName, UserPrincipalName | Export-Csv -Path "C:\Tools\Reports\NoMNGUsers.csv" -NoTypeInformation

If you need to obtain a similar report on other user criteria’s, here are the other articles of this series which would help you to achieve it.

  1. Find and export list of users with no Manager Name set in Office 365 profile:
  2. Find and export list of users with no Manager Name set in Office 365 profile:
  3. Find and export list of users with no Profile Picture set in Office 365 Account:
  4. Find and export list of users with no Birthday set in Office 365 profile:
  5. Find and export list of users with no Country set in Office 365 Profile:
  6. Find and export list of users with no Department set in Office 365 Profile:
  7. Find and export list of users with no Skills Defined in Office 365 profile:
  8. Find and export the list of users who has not completed About Me section in their Office 365 profile

DISCLAIMER NOTE: This is an enthusiast post and is not sponsored by Microsoft or any other vendor.

Configure routing all incoming calls to Teams client

Our internal IT team was in the mission of setting up calling feature of Microsoft teams ad we discovered that the calls are not directly routed to user devices. Users can dial out from Teams clients, Desktop and mobile both however, Teams client automatically diverts incoming calls to voice mailbox.

With this post, I am going to explain through the steps of the analysis of the issue and how we managed to configure Teams coexistence mode to route incoming calls to the Teams client.

During our discovery:

  1. We went through Call forwarding settings in Teams client on several devices (Teams Client > Settings > Calls > Call Forwarding Settings) and figured out that call forwarding is disabled. Which basically proves our first assumption is out. Client side forwarding option isn’t the cause of this issue.
  2. Then checked Skype for business admin center to find out if any helpful entries are there as it provides PSTN usage detail reports on inbound or outbound calls. Anyhow, this had nothing to offer in our case so that’s out as well.

However, having a Microsoft calling plan to connect to the PSTN is mandatory. Ensure that you have a calling plan applied to your tenant and then you can go ahead and assign phone numbers to your users from Skype for Business and Teams Admin Centers. Calling plans are detailed in this Microsoft write-up.

Call routing is depends on the coexistence mode configurations defined in the Teams & Skype for Business Admin Center. Coexistence offers the flexibility of configuring in two different scopes.

  1. User context
  2. Tenant context (Organization wide)

2-14-0

It simply means that, if you configure the coexistence in user context mode while tenant context exists too, tenant context will be overwritten by the user-context mode. Above chart explains the behavior of each scenario.

Now in our scenario, this tenant was configured as the coexistence mode islands, hence any of our calls were automatically transferred to the Skype for Business client. However, because we didn’t have Skype for Business downloaded on our devices, we didn’t receive any of these calls. Once we had updated these settings and waited for it to sync with Office 365, calls were simply received in Teams client.

Here are the steps taken to achieve this. First, log in to your Office 365 tenant using Global Admin account, and, head on to Admin centers –> all Admin centers –> Click on “Teams and Skype

2-14-1

  1. On left pane, expand Org-wide settings
  2. Click Teams upgrade

You will notice the Coexistence mode in in Islands state here.

2-14-2

Go ahead and change this to “Teams Only” mode from the dropdown menu.

2-14-3

Save the change.

2-14-4

And, confirm the upgrade by accepting the message. hit “Save” again.

2-14-5

When you done with this. Ensure that all users across the organization follow the root. They should have the “User Org Wide Settings”.

1111111

Useful links:

DISCLAIMER NOTE: This is an enthusiast post and is not sponsored by Microsoft or any other vendor.

Configure OneDrive access delegation up on account removal

When you remove a user from Office 365 or Active Directory, you can decide what to do with this user’s content, e-mail account and related product licenses. For more information on this refer to my previous article- Things to consider when deleting a user account from an Office 365 subscription.

Access%20Delegation-01

With this article, we will discover how we can configure OneDrive to automatically delegate access to someone else up on a user’s departure (after the removal of the account). In simple terms, let’s configure delegation.

Default setting for a deleted user is- the access granted to the Manager of the particular user for 30 days period (unless you have customized the retention period). But, what if a user has no Manager defined and access delegation is disabled, too ? In that case, OneDrive will follow the steps described in my previous article (Things to consider when deleting a user account from Office 365). So make sure you read through that, too.

Here are the steps:

Sign in to Office 365 Admin Center as an Global Admin. If you are prompted with a Access message, probably you do not have Global Admin rights. You may either have to request or perhaps you may not be the right person to do this task in your organization so refer to the right guy.

Next up, Expand the navigation with “Show all” option.

clip_image002_thumb[2]

Head on to “All admin centers

clip_image003_thumb[2]

And choose “SharePoint Admin Center

1

From here let’s head on to Classic SharePoint Admin site because these settings we are going to manage are not yet available in Modern SharePoint Admin Interface.

2

Once you are in the classic page, go to “User profiles” tab.

4 

Then “Setup My Sites” from My Site Settings tab.

3

Now scroll down to the bottom of Setup My Sites page till you see the following screen.

Enable the access delegation here and define a secondary owner as well. As it described well in the description:

  • Access delegation option allows OneDrive to automatically delegate the control to Manager up on any user identity removal.
  • If you define a secondary owner, that might be useful in a scenario where the Manager of a particular user is unavailable but OneDrive is still delegated to the secondary owner.

5

Additionally, you can enable this option as well. It simply means that you can have a one person who is the secondary owner of all user’s Mysite/OneDrive content.

6

Read my previous post to understand the fundamental things to be considered when deleting a user account from Office 365 and Customize OneDrive retention period article to set your own retention period for OneDrive accounts.

DISCLAIMER NOTE: This is an enthusiast post and is not sponsored by Microsoft or any other vendor.