December 23, 2020

How to change Internal name of Custom List OR Document Library in SharePoint Online

Issue:

Recently, we have provided a build and guideline document to our client and by mistake they have set up a library name with in-correct internal name. In starting it worked well but as the additional functionality added, it broke. As the users have started working on that. So, we have to fix the internal name anyway on client environment.

Our library internal name is “TrainingDocuments” and display name is “Training Documents”. but Client has set up “Training Documents” as internal name and this was not correct.



Solution: 

Initially, I thought it might not be possible and have to delete the document library and re-create from scratch on client environment. But then I've found 2 different ways to fix that.

Approach 1: Using SharePoint Designer 2013

Follow below steps to fix the internal name using SharePoint Designer 2013:

  • In SharePoint Designer, Open your site.
  • Navigate to All Files navigation node (not List and Libraries node),
    Note – you will need “Site Collection Administrator” permission in the site collection to see “All Files” option.

  • Find your list there
  • Right-click list
  • Rename.



Approach 2 : Using PNP PowerShell

In case you are not able to connect the site in the SharePoint designer or you do not have installed in your machine, you can do this using PNP PowerShell as well.

Note - You will need Owner permission to run this PowerShell. 

PowerShell to change Library Name:

 #Set Parameters  
 $SiteURL = "Site URL"  
 $ListName = "Library Internal Name"  
 $NewListURL = "New Library Name"  
 Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential)  
 $List= Get-PnPList -Identity $ListName -Includes RootFolder  
 $List.Rootfolder.MoveTo($NewListURL)  
 Invoke-PnPQuery  
 #this will change library title  
 Set-PnPList -Identity $ListName -Title $NewListURL  

PowerShell to change List Name:

 $SiteURL = "Site URL"  
 $ListName = "List Internal Name"  
 $NewListURL = "New List Name"  
 #Connect to PNP Online  
 Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential)  
 Set-PnPList -Identity $ListName -Title $NewListURL  
If you have any questions you can reach out our SharePoint Consulting team here.

December 21, 2020

How to Manage Item Level Permission with different Role Definitions using Power Automate?

Introduction:

In this blog, we will learn how to set item level permission on SharePoint List/Library using Power Automate with different role definitions. 

Scenarios:

We have come across with a requirement wherein we need to apply item level permission to a specific SharePoint group with different role definitions. In OOTB Workflow, this is very simple and easy. With Power Automate how we can manage this? We will discuss this in this article.
Below are the steps we are going to automate here!

1. Break the current Item Permission
2. Get ID for our SharePoint Group
3. Assign Role definition for a specific item to our SharePoint Group 

Step 1: Break Current Item Permission

1. Add a new "Send an HTTP Request to SharePoint" action.

2. To add/replace the permission on an item level, we first need to Break the Permission Inheritance.

Site Address: Select the site in which the List/Library resides.
Method: POST
Uri:/_api/web/lists/getByTitle('[List/LibraryName]')/items[ItemID])/breakroleinheritance(copyRoleAssignments=false, clearSubscopes=true)

Here, parameter copyRoleAssignments = true/false. This specifies if we want to copy inherited permission or not. If set to true, then it will copy the inherited permission else it will remove all the users when breaking the inheritance.

Step 2: Get ID for our SharePoint Group

1. Add a new "Send an HTTP Request to SharePoint" action.
Site Address: Select the Site in which the group resides
Method: GET
Uri: /_api/Web/SiteGroups/GetByName('[Group Name]')?$select=Id

2. Parse JSON.

Add below JSON payload in “Schema” section.
 {  
   "type": "object",  
   "properties": {  
     "d": {  
       "type": "object",  
       "properties": {  
         "__metadata": {  
           "type": "object",  
           "properties": {  
             "id": {  
               "type": "string"  
             },  
             "uri": {  
               "type": "string"  
             },  
             "type": {  
               "type": "string"  
             }  
           }  
         },  
         "Id": {  
           "type": "integer"  
         }  
       }  
     }  
   }  
 }  

Step 3: Assign Role definition for a specific item to our SharePoint Group 

1. Add "Send an HTTP Request to SharePoint" for assigning the permission to the group/user we fetched in above step.


Site Address: Select the site in which the List/Library resides.
Method: POST
Uri: /_api/web/lists/getByTitle(‘SiteName’)/items([Item ID])/roleassignments/addroleassignment(principalid=[Id from Prase JSON step], roledefid=1073741829) 
 
Here, Roledefid = id for specific role. Roledefid for following roles are as below:
Full Control = 1073741829
Edit = 1073741830
Read = 1073741826

 For specific tenant if we want to find role definition id then use below URL:

API: "[Site URL]/_api/web/roledefinitions?$select=Name,Id" 

This will give you roledefid for following access rights:

Design
Contribute
Limited Access
Limited View
Limited Edit
View Only
Set the appropriate roledefid for the provided access roles.

 

Conclusion:

This is how we can assign specific role definition to a specific group to maintain item level permission using Power Automate. 

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

December 18, 2020

Binary Republik Proud to be Named a Global Leader on 2020 Clutch 1000!



Here at Binary Republik, we know it’s been a difficult year all around. Despite the conditions, we’re proud to report we’ve maintained our standards of quality and service as a leading Microsoft Technology Consulting company. We made sure that our clients had access to cutting edge technology and were able to get acclimated to a new normal.

As a wonderful way to wrap up the year, we’ve been featured in the Clutch 1000, an exclusive list of the top 1% of vendors on their platform. Clutch is a B2B market research authority that uses a one-of-a-kind ranking formula to identify key players in the services space.

We are thrilled to have been chosen as one of the top Microsoft Technology Consulting company and it proclaims our dedication and quality of the work we deliver to Microsoft ISVs, MSPs, MVPs, and more - Jaldeep Patel, Global Director, Binary Republik

We couldn’t have earned this award without the help of our wonderful clients. Take a look at some of
the kind words they had to share about our work when interviewed by the Clutch team:

“The most impressive aspect of Binary Republik was the size of both their team and their knowledgebase. Many firms only specialized in custom development or system architecture. Other firms didn't have an expert for every subject, but with Binary Republik we knew that someone on their team would be able to help us find an answer. Because of their size, they are also able to get back to us quickly while still maintaining genuine communication and professional relationship.”
                                                            – Web Applications Developer, Community College

“Binary has a great team that is focused on helping customers to solve their problems. They come to the table with an open mind and give realistic honest solutions and suggestions. They estimate and on-time delivery is unmatched”
                                                             – VP of Product & Engineering, Inkriti

“Like many companies, we've had varying degrees of success with offshore & outsourcing, especially outside Europe. However, Binary Republik displayed none of the negative aspects typically experienced with offshore vendors whilst remaining significantly more competitive than onshore vendor partners.”
                                                             – Product Manager, Education Services Company

We’re honored to be recognized by Clutch and our clients, and look forward to even more success in
2021! If you’re new to Binary Republik, contact us today to learn more about our award-winning
strategy and how it can help fuel your success in the new year!