Posts

Showing posts from July, 2020

Rename Folder using Microsoft Flow / Power Automate in a Document Library in SharePoint Online

Image
Hi Friends,
Today blog is about renaming the folder in the document library using the MS FLOW or MS Power Automate. When I started working on this it seems to be an easy job, but if you look into the connectors you'll find it really difficult as there is no straight forwards connector to do the job.

Issues encounteredIf you try using the "Get Folder Metadata" connector, you'll not be able to get the ID of the folder as it is returning as the negative value.If you get the ID somehow and try to update the folder name using the "Update File Properties" connector, you'll end up renaming only the title of the folder, but it will still have the old name as the display name which in case is again a failure.There is no other connector which can be utilized to achieve the task of renaming the folder in a document library directly.
SolutionThe solution is a simple three-step (at least in this example).
Step 1: Initialize variablesIn case you are computing values for …

Connect-PnPOnline Error: "Token request failed"

Image
Hi friends,
I was working on PnP Powershell and while trying to connect it to the site via AppId & AppSecret or ClientId & ClientSecret I started getting the error: "Connect-PnPOnline: Token request failed". After a lot of googling, I got the solution or say the root cause of the issue.


Find out the expiration dates of the SharePoint Add-ins installed to the Office 365 tenancy When a SharePoint add-in is created, the ClientId and ClientSecret is valid for the duration of 1 year, after that you need to renew the ClientSecret. To verify the valid keys in your tenant execute the below code
Step 1: Install the MSOnline moduleTo get the information, you need to install the MSOnline module. To install open the Powershell application with the Administrator rights and execute the below command


This will install the necessary module
Step 2: Check for the valid ClientId'sExecute the below code in the Powershell. This will return all the valid ClientID's. Below script will fi…

List View row Formatting: Discussion Board

Image
Hi Friends,
I have seen that in on-prem many of the users are using the discussion feature, but in SharePoint Online we do not have this feature. To give it a thought I have implemented somewhat similar functionality.

Discussion board formatting gives the ability to showcase the discussion which is a page, under specific category which will make more sense to the discussion board. So, whatever category you want to create, create the folder for that and the corresponding pages beneath it.
This discussion board formatted displays the banner image (not the thumbnail image) and showcases it in the front along with the title, description, Likes, Comments, Date of last edit, and the owner of the page(not the author).
No new column needs to be created only the existing column needs to be added to the view. For that execute the below PnP code

# If want to modify the existing view Set-PnPView-List "Site Pages"-Identity "<Name of the view>"-Fields "Modified", &qu…

List View Row Formatter - Issue Tracking

Image
Hi friends,
Microsoft has changed the SharePoint drastically and now we do not need to write the custom solution for every need and take a toll on the performance. List view formatted is very powerful and I think it solves a lot of problems where we need to write the custom code and there is the least performance hit as well.
Today I have worked upon the "Issue Tracking List" - list view row formatted.


You can find the JSON file here
Features Simple viewLarge view dedicated to the comments section, so once can read all the comments against the issue in a single view without even opening the itemA lot of filters, clicking on the below columns filters the list upon that value. So one not need to create multiple views


Happy Coding !! #Microsoft #SharePointWidgets