I am able to read the Group titles Successfully. However when I try to read the Users details of the group, I get an error
An unhandled exception of type 'Microsoft.SharePoint.Client.ServerUnauthorizedAccessException' occurred in Microsoft.SharePoint.Client.Runtime.dll
Additional information: Access denied. You do not have permission to perform this action or access this resource.
I have full control on the Sharepoint Site.
Steps to Reproduce:
The below piece of code executes successfully, the moment I uncomment the lines 45 to 52 I get the above mentioned Error.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.SharePoint.Client;
using System.Net.Security;
using System.Net;
What SharePoint development model, framework, SDK or API is this about? SharePoint C#
Developer environment Visual Studio Console App
Describe the bug / error I've used the code from the link https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ee538244(v=office.14) to retrieve the users from the Sharepoint Groups.
I am able to read the Group titles Successfully. However when I try to read the Users details of the group, I get an error
An unhandled exception of type 'Microsoft.SharePoint.Client.ServerUnauthorizedAccessException' occurred in Microsoft.SharePoint.Client.Runtime.dll Additional information: Access denied. You do not have permission to perform this action or access this resource.
I have full control on the Sharepoint Site.
Steps to Reproduce: The below piece of code executes successfully, the moment I uncomment the lines 45 to 52 I get the above mentioned Error.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.SharePoint.Client; using System.Net.Security; using System.Net;
namespace SPGroupusers { class RetrieveAllUsersInGroup { static void Main() { Console.Write("Enter UserName (domain/userid): "); string strUserName = Console.ReadLine(); Console.Write("Enter your password: "); string pass = getPassword(); Console.WriteLine();
}
Expected Behaviour: I would like to get the list of users.