Get manager (V2) Action – No manager was found for the specified user error.

I have a Power Automate flow where I am using the Get manger(V2) action. Get manger(V2) is an action that queries for the Manager of a given M365 user. When you are using the free M365 Developer tenant, you can end up with a global admin with no manager name (see the third screenshot below). Unless you fixed this ahead of time, creating a flow as a global admin can lead to this kind of error.

The solution is to make sure that the user using your flow has a Manager assigned inside the M365 tenant/Azure AD.

=> Below is the screenshot you see inside the Power Apps flow designer:

=> Below is a screenshot of the email you get as that flow user:

=> Below is where you have to add a manager for your user. Note: You need to be a global admin to do this.


Export Managed Metadata value of “TaxonomyFieldMulti” type with PnP PowerShell

I was tasked to create a report containing the list of items (with columns including Managed Metadata) for all document libraries in all SharePoint Online (SPO) sites with STS#3 template type in the tenant that are tied to specific Content Types.

It’s straight forward when it comes to exporting columns (or fields) that are non Managed Metadata type. However, if especially the Managed Metadata column has multiselect properties (a.k.a. of TaxonomyFieldMulti type),then your CSV file may end up with a value of System.Object[] (or a different object type) inside your CSV file (see screenshot below). 

This can be frustrating to look at, especially when you have hundreds or thousands of rows of data which may have multiple columns that contain this type of information. Since our “Department” Managed Metadata field can have multiple values, we are dealing with collections, and we need to parse them accordingly using a couple of options. With the help of this post I was able to resolve my issue so that my CSV file captured all field values cleanly as seen below:

Below is the PnP PowerShell script code that reads all relevant sites/libraries and later export to a csv file, save it to a local folder and if you want upload, it to a reporting library inside a SPO site.

$siteCSVWillBeSaved = "https://[TenantName][site alias]"
$clientID = 'Your Azure AD registered app client id'
$tenantName = "[TenantName]"
$thumbPrint = 'Your ThumbPrint'

$startTime = Get-Date
$dateStr = $startTime.ToString("yyyyMMdd")
$ReportOutput = "D:\Code\MyReports\spo_file_metadata_$($dateStr).csv"

#get all site collections with no M365 Group template 
$allSiteCollections = Get-PnPTenantSite | Where-Object { $_.Template -eq "STS#3" }

$Results = @()

#loop through all site collections with STS#3 template type
ForEach ($site in $allSiteCollections) {
 Connect-PnPOnline -Url $site.Url -ClientId $clientID -Tenant $tenantName -Thumbprint $thumbPrint
 #Looking for all document libraries in a given SPO site
 $DocLibrary = Get-PnPList | Where-Object { $_.BaseTemplate -eq 101 } 
 foreach ($DocLib in $DocLibrary) {
    #Get libraries that are tied to these two CTs (Document Set Dept and Document Dept)
    $contentType = Get-PnPContentType -List $DocLib | Where-Object { ($_.Name -eq "Document Set Dept") -or ($_.Name -eq "Document Dept") }

    #If the library exists
    if ($null -ne $contentType) {
        #Get the particular library 
        $List = Get-PnPList -Identity $DocLib

        #Get Items from the document library
        #$ListItems = Get-PnPListItem -List $DocLib -PageSize 500

        Write-Host "Total Number of Items in the List:"$List.ItemCount
        $ItemCounter = 0
        #Iterate through each item, hence ONLY document libraries that have items get reported 
        foreach ($Item in $ListItems) {
            #$Results += New-Object PSObject -Property ([ordered]@{
            $Results += New-Object PSObject -Property ([ordered]@{
                    Name        = $Item["FileLeafRef"]
                    Type        = $Item.FileSystemObjectType
                    FileType    = $Item["File_x0020_Type"]
                    RelativeURL = $Item["FileRef"]
                    FileSize    = $Item["SMTotalFileStreamSize"] 
                    CreatedBy   = $Item["Author"].Email 
                    CreatedOn   = $Item["Created"] 
                    #Department   = (($Item["Organization_x0020_GoA"].Label) -join ',') #option 1 Department concatenated with comma
                    Department   = (@($Item["Organization_x0020_GoA"].Label) | Out-String).Trim() #option 1 with one nice formatting
            Write-Progress -PercentComplete ($ItemCounter / ($List.ItemCount) * 100) -Activity "Processing Items $ItemCounter of $($List.ItemCount)" -Status "Getting Metadata from Item '$($Item['FileLeafRef'])"         


#Export the results to CSV
$Results | Export-Csv -Path $ReportOutput -NoTypeInformation
Write-Host "Document Library Inventory Exported to CSV Successfully!"

#Connect to Report library site
Connect-PnPOnline -Url $siteCSVWillBeSaved -ClientId $clientID -Tenant $tenantName -Thumbprint $thumbPrint

#powershell pnp to upload file to CSV report library site
try {
    Add-PnPFile -Path $ReportOutput -Folder $DestinationPath -ErrorAction Stop
    Write-Host "CSV file saved to IMReoprtLibrary Successfully!"
    Add-Content -Path $IMReportTraceLog -Value "CSV file saved to IMReoprts library Successfully" 
catch {
    Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red
    $itemError = $($_.Exception.Message)
    $errorLineNumber = $Error[0].InvocationInfo.ScriptLineNumber
    Add-Content -Path $IMReportTraceLog -Value "Error raised: $($itemError) at line # $($errorLineNumber)"
    Write-Host "Error raised: $($itemError) at line # $($errorLineNumber)"

How to add more users to your free Office 365 Developer tenant

One of the benefits of having MSDN subscription is to get a free Developer Office 365 tenant with 25 users. The challenge is that you have to go through some fiddling before you can be able to add more users into your tenant. Below is a screenshot that you can click to see how you can add more users into your shinny O365 tenant.


How to update existing SharePoint External Content Types (ECT)

The question is you have created several External Lists inside SharePoint using ECTs and now the database where you used to create ECTs is moved to a different server. Besides the name of the database is changed. However, table names haven’t changed.

Instead of recreating new ECTs and then new External lists, I want to update my existing ECTs with the new Database server name, Database name and new Target Application ID so that my existing External Lists continue working. That is the plan.

Below are main assumptions before venturing in updating existing SharePoint External Content Types:

  1. Business Connectivity Service is configured in Central Admin.
  2. Secure Store Service is configured in Central Admin and you had a Target Application ID created inside the secure store called OldTargetApplicationID. Below is how it was created.April-11-2019-1Next we chose Windows user Account as we are using an Active Directory Account which is already given to the external database and now the plan is to add that AD account’s credential in here so that our SharePoint External list can surface content on behalf of the AD account.April-11-2019-2April-11-2019-3

While you are in the list of Target Application ID page, go to your ID and choose Credentials


Add your AD service account and password. This is the ID that is already given access to your external database.


3. Using SharePoint Designer, you created an ECT before and was consuming inside SharePoint. However, IT and Business decided to move the external Database that ECT is consuming into a new SQL server database and also changed the database name. However, table names haven’t been changed.

Now you do the following to update your ECTs:

  1. Create new Target Application ID called NewTargetApplicationID. Inside the secure store service application. Meaning new AD service account would need to be created and given access to the new database and using above steps new target application ID created.
  2. Go to your SharePoint Designer, ECTs and Edit ECT. In the dialog box update the following: Database Server, Database name and Secure Store Application ID (the assumption is you are using Impersonate Windows Identity option for Authentication mode.
  3. Click Ok.
  4. Now we need to go to Business Connectivity (BCS) service application and make sure permissions are set as expected. These two Microsoft blog posts have valuable information on this: Create external content types for SQL Server in SharePoint and Manage Business Connectivity Service Applications.
  5. Inside the BCS you see the list of ECTs. You click each one of them and configure permissions by choosing “Set Object Permissions”. Next you will add the right user who can have one of the 4 listed (see table below).
    Permission Notes
    Edit Allows the user or group to create External Systems and BDC Models, to import BDC Models, and to Export BDC Models. This setting should be reserved for highly privileged users.
    Execute Allows the user or group to execute operations (create, read, update, delete, or query) on ECTs.
    Selectable in clients Allows the user or group to create external lists for any ECTs, and to view the ECTs in the external item picker.
    Set permissions Allows the user, group, or claim to set permissions on the Metadata Store.
    At least one user or group must have this permission on every BCS connection so that permissions management can occur. With this permission, a user can grant Edit permissions to the Metadata Store. This setting should be reserved for highly privileged users

Office 365 and SharePoint Community Go-To Resources

I am cross-posting this so that I have the resource at hand for reference. Big thank you goes to Eric Overfield who I follow as one of my goto resource person.

The great thing about technology is that feeling connected is literally a click away and the Office 365 / SharePoint community is no different. Now, don’t get me wrong, conferences, user groups, and social meetups are a great way to stay connected, but on those days when you’re stuck at your desk I’ve got just the solution.

The following are the top 10 resources that I follow to stay in the loop on what is going on in the Office 365 / SharePoint community. I will readily share that not only did I have a tough time narrowing down my list to just 10, but also that this list constantly changes as community involvement waxes and wanes, new members / resources spring up, while others slow down. I hope you will find this line up to be either a good start, or a great way to help fill out your current references.

  1. The SharePoint Dev Ecosystem YouTube channel:
  2. Office Development blogs:
  3. Waldek Mastykarz’s blog. If you want to know what is going on with SPFx development, this is your spot:
  4. Mikael Svenson’s blog. Mikael posts like a fiend and all his findings are fascinating:
  5. Smashing Magazine. Some of the best bleeding edge web development insights:
  6. Andrew Connell’s blog. Andrew is a leader of the pack of SPFx trainers and his material around SPFx is outstanding:
  7. SharePoint Team’s blog. Straight from MS:
  8. Marc Anderson’s blog. Marc tells you how it is.
  9. Chris O’Brien’s blog. An outstanding developer who provides in-depth posts, meaning long, in the right way:
  10. Stefan Bauer’s blog. Stefan’s design skillset when combined with his mastery of Sass is amazing and he shares his insights!
  11. Eric Overfield: and


Add Reusable Workflow in SharePoint Designer 2013

The way we  create reusable workflow in SharePoint Designer (SPD) 2013 is a bit different from 2010 and as a result most people thought that Microsoft disabled this feature. The fact is this feature is still available but the way you navigate to creating  a reusable workflow in SPD 2013 is a bit different from SPD 2010. This is how you create a reusable workflow in SPD 2013 :

  1. Open the site in SPD 2013.
  2. Now instead of using the ribbon, which is what we used to do in SPD 2010, click File menu as seen in screenshot below
  3. This will take you to this page where you can create a reusable workflow by clicking the “Reusable Workflow” icon as seen below:


How to change SharePoint List or Document Library URL using SharePoint Designer

There are two ways of changing your SharePoint list or library URL. The first one is, of course, using PowerShell which I am not going to discuss now. The second one is using SharePoint Designer. You need to have site collection admin access to do this.

Suppose you want to change the URL, http://sitename/sites/testsite/Lists/Bad List Name/  to http://sitename/sites/testsite/Lists/GoodListName/  using SharePoint Designer then follow these steps:

1.  Open your site using SharePoint Designer

2. Click All Files from left navigation menu

3. Click Lists from the list of All Files

4. Right click into Lists ->Rename and change it from Bad List Name to GoodListName.

5. This will change the URL of your list


That is it…

How to move SharePoint list items/documents with metadata properties intact

If you want to move contents of SharePoint Document Library or List with intact metadata then use Content and Structure that you can find under Site Administration page of your site. URL is http://YOURDOMAIN/sites/_layouts/settings.aspx.

Before using either copy or move actions make sure you create a destination library/list/folder names in your the destination site:




Modernizing SharePoint? – Nik Patel’s thoughts on SharePoint Online Document Library Experience Updates — Office 365 and SharePoint with Nik Patel

Microsoft has pushed out one more “Sneaky” release in Office 365 relating to SharePoint Online document library experiences. If you have “First Release” tenant, you would start noticing new banner on SharePoint online document library page stating – “Check out new document library look!”. I call this “Sneaky” release. Even though this is a huge change […]

via Modernizing SharePoint? – My thoughts on SharePoint Online Document Library Experience Updates — Office 365 and SharePoint with Nik Patel

%d bloggers like this: