October 11, 2019

FileShare migration with updated metadata to SharePoint

We have a requirement to migrate the large number of documents from File Share System to SharePoint with metadata. Normally, we can easily migrate the large number of documents from File System to SharePoint, but the challenge is to update the large amount of metadata in SharePoint List/Library in quick time.

Resolution:

To change the metadata manually one by one is a very time-consuming process. And it is very complicated to update the large amount of metadata using OOTB “Quick Edit” feature of SharePoint.

To overcome this challenge, we have used ShareGate, third-party tool. 

We can migrate the files from File Share to SharePoint with updated metadata in very quick time using below steps.
  • Browse the ShareGate application, then select the “Import file shares” option as shown in the below screenshot. 

  • Connect the Source folder - File share path and Destination - SharePoint Library where documents need to be migrated.
  • Select All or Particular Documents for which metadata needs to be updated.
  • Click on “Export metadata”.

  • Update the Configuration as required and click on “Export”.

  • Click on “Open file” to update metadata in the excel file.
  • For multiple managed metadata column, add the comma-separated values. 
  • For Person or Group column, add the values like “Firstname Lastname” as shown below.

  • Once the metadata are updated, click on “Import & Edit” to import the documents with updated metadata.

  • You can also import the updated metadata from "Copy" section as shown below.

  • Files with updated metadata will be imported in SharePoint document library.

If you have any questions you can reach out our SharePoint Consulting team here.

October 1, 2019

How to get Organization Asset Libraries in SharePoint Online using REST API

Organization Assets Library is a new feature introduced in Office 365 which is a tenant level object. Currently, Organization Assets Library can be created only through PowerShell commands.

I was developing custom SPFx web part to display a list of Organization Assets Libraries. As it was a custom SPFx web part, I was looking for approach like REST API calls to fetch the Organization Assets Libraries instead of CSOM. After a deep analysis, I came to know that we can use REST API call to get the Organization Assets Library with their properties.

Solution:
Use below SharePoint REST API to get the Organization Assets Libraries for a tenant:

https://<Tenant.sharepoint.com>/_api/Microsoft.Online.SharePoint.TenantManagement.Office365Tenant/GetOrgAssets

This API will return the collection of Organization Assets Objects. It will return below properties for organization asset objects as shown in below screenshot.
REST API call result schema

Here are few points about Organization Assets libraries and REST API those need to be noted:
  • This API is retrieving tenant-level objects (Microsoft.Online.SharePoint.TenantManagement.Office365Tenant). So, it will return results only for users who are assigned with "SharePoint Administrator" role in the Office 365 tenant. 
  • All the Organization Assets objects must be created in a single site collection only.
  • Once the object/library is created, it will take 24 hours to get the Organization Asset objects using the API . Here is the more details how this API works:
    • There is an Azure function, which gets triggered by a timer (once a day).
    • The function gets SharePoint metadata and extracts all valuable information into JSON object.
    • The function stores JSON in Azure blob.
    • SharePoint REST API Metadata uses JSON, saved by Azure function to show you the metadata info.
If you have any questions you can reach out our SharePoint Consulting team here.