Skip to main content

Posts

How to check user permissions for site using CSOM in SharePoint Online

In this article, we are going to learn, How to get the user permission on the site using csom or how to get the user permission programmatically, to get the permission of the user on a particular site we use GetUserEffectivePermissions() method in csom. In the SharePoint, user requires permission to perform any operation, when we work with provider-hosted add-ins and in some scenarios, we need to check the permission of user we use the GetUserEffectivePermissions() method and by passing the user name we get its effective permission on the site. 
In this example, We have created a console application to check whether the user have edit person or not on site. 
Pass the context of the site and email of the user into a method to check the permission of the user on the site. You must ensure users on the web before checking permission. 

using System;  
using System.Security;  
 using Microsoft.SharePoint.Client;  
 namespace PracticeCsom  
 {  
class Program   {   static void Main(string[] args)   {   …
Recent posts

How to check permissions of user on sharepoint list using csom.

In this article, we are going to learn "How to check the permissions of user on SharePoint list using csom " or permissions of user using code. In provider-hosted SharePoint Add-ins, we use the csom code and to check the permission of the user on a particular list, once we get the effective permission of particular user on the SharePoint list and then by using that permission we can check the particular kind of permission like Addlistitem, Editelistitem, etc.

In this example, we have created a console application to check whether the user has edit permission on the list or not.
 Pass the client context, email of the user and list name on which you want to check the permission of the user.



using System;

using System.Security;

using Microsoft.SharePoint.Client;

namespace PracticeCsom

{

    class Program

    {

        static void Main(string[] args)

        {
           string siteUrl = "https://***.sharepoint.com/sites/***/";
          using (ClientContext clientCon…

How to get the Sharepoint Field Internal name by display name using CSOM?

In this article we are going to learn  “how to get the sharepoint internal field name using the display name” of field.
To perform any operation on the field. First we need to get field collections, every SharePoint list have fields and we can get it as FieldCollection. By iterating the field collection we can get information about all the fields.
Call the method and pass the context , name of the list from which you want to get data and display name.

 GetInternalFieldName( ClientContext clientContext ,string listName, string fieldDisplayName){
       string fieldInternalName= " ";
       var web = clientContext.Web;
      clientContext.Load(web);
      List listEventSource = web.Lists.GetByTitle(listName);
      FieldCollection fields = listEventSource.Fields;
      IEnumerable<Field> fieldsColl = clientContext.LoadQuery(fields);
      clientContext.ExecuteQuery();
       foreach (Field f in fieldsColl)
      {            if (f.Title ==fieldDisplayName)            { …

How to create list from template in sharepoint

In this article, we are going to learn how to create a list from list template or using(.stp) file or we can say create list from existing list. Once you save the list as a template, It appears into List template option under the web designer gallery on site setting page.

Steps to create list from list template:

1 Move to the site setting section where you have saved the list template.

2. When you click on the List templates, you will redirect to the List template gallery and from the list template gallery.
3. Now click on the File in ribbon and click on the upload document.



4. Browse the location where your list template is downloaded. I am uploading the template of an address list.

5.  After browsing the template, now you can give the name what you want to give to the list template and click on save.


6. Now the list template file appears into the list template gallery. Now click on the gear  icon and click on the Add an app.
7. On clicking add an app, you will redirect to site cont…

How to change the navigation in communication site sharepoint

In this article, we are going to learn, how to change the navigation in Modern SharePoint. In modern communication sites, two navigation options are available Megamenu and Cascading by default the megamenu is selected. You can also get answers related to your queries like "How to change header and footer".
Follow the steps to change Navigation:

1. Navigate to your SharePoint site and click on the setting icon.

2. Under Change the look option, click on the Navigation.


3. On the navigation options by default, the megamenu option is selected. Now you can save it or cancel it.

4. If the selected option is megamenu, your site navigation will look like this.



5. If you select the cascading option and save it.


6. If you selected the cascading option. site navigation will look like this.



Other things into the change the look option.

In the change the look setting, we have multiple options like Theme, Header, Navigation, Footer.
In Footer option under Change the look, In this option y…

How to install sharepoint designer

Steps to install sharepoint designer also known as SPD. SharePoint 2013 is the last updated version from the SharePoint. There is nothing like SharePoint designer 2016 or SharePoint designer 2019 exsits.
1. Search for the SharePoint Designer and when you click on the link and move to the download page or You can click on Download SharePoint Designer 2013

Now select the Language and Click on the Download. on clicking, you will redirect to the page where you can select the compatible version of the SharePoint designer and click on the Next and file will be downloaded.

Now move to the location where your SharePoint designer setup file is downloaded. Click on the file and it will extract the file.

After extracting, click on ths Install Now

after the installation, you will redirect to the completion page.

The installation of your SharePoint designer is completed.

Save site as template option in sharepoint online

When you want to replicate a site that you have already created and for this, you have to save site as template.  For this, you go on Site settingand thenmove to Site actionbut you did not find the option “Save site as template” option.