Questions tagged [.net]

.net refers to the application framework installed on a Windows and SharePoint server.

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

What settings are needed in Azure AD / Microsoft Entra ID for client id + certificate based SharePoint authentication?

I've been going round in circles the last 3 days since MFA got enabled and the console application that used username/password to authenticate and add/deleted files/folders to various SharePoint sites ...
0 votes
0 answers
9 views

how to use CSOM in UWP in Visual Studio to grab a list or site's full user permissions

I've tried searching for tutorials or guides but could anyone point me in the direction of using a .NET application that grabs a sharepoint online site/lists users and their permission levels? Thank ...
0 votes
2 answers
2k views

Save email from Outlook Online to SharePoint library through an AddIn

I have a requirement to a selected email(s) to Outlook through an Add-In. I need it to work with the Outlook client app as well as Outlook Online. I put together a simple VSTO plugin in the Outlook ...
0 votes
1 answer
1k views

How to filter query with multiple condition in URL - OData

I want to filter the data with Type 'Com and State 'Disconnected'. With below code i am getting the exception. How do I fix this? Please help! $filter=(contains(Type,'Com') and contains(State,'...
1 vote
2 answers
6k views

Use SharePointOnlineCredentials in .net 6

I've been doing a lot of CSOM application for different clients, and have always been fine using SharePointOnlineCredentials to connect and do my things. However, I created a new project in .net 6 to ...
0 votes
1 answer
1k views

Adding Microsoft.SharePoint.Client reference to project in Visual Studio Code

I'm just starting out with a new Console Application project in VS Code and I need to add a reference to my project for Microsoft.SharePoint.Client using: dotnet add package Microsoft.SharePoint....
0 votes
0 answers
26 views

Developing web application using Power Apps, Power Automate with SharePoint compared to using .NET and SQL server

I have been working on building web applications using those 2 approaches: - ASP.NET Core and SQL Server Power Apps, Power automate & SharePoint online. Now when it comes to secure the backend ...
1 vote
0 answers
313 views

PnP Framework Interactive MultiFactorAuth

I keep going round and round on this as it seems I keep getting out of date examples. I need to create a simple Sharepoint Admin Application and I keep failing at Authentication. I need a way to ...
1 vote
1 answer
740 views

Upload file to Sharepoint online aspx page using .NET Framewotk 4.7 console app

I'm new to Sharepoint. Is it possible to upload files to an aspx page using c# and .NET Framework 4.7? The site I'm trying to upload to is "https://myorg.sharepoint.com/sites/SPODemo/Test%...
0 votes
1 answer
992 views

Retrieve file version metadata with CSOM

My organization is requiring that we rewrite all of our sandbox solutions as we shift to SP 2013 as provider-hosted apps using CSOM. One of the event receivers I wrote would previously use the ...
0 votes
2 answers
2k views

Connect to SharePoint Online from our console application when the "DisableCustomAppAuthentication is set to true"

We have a lot of .Net console applications which run inside windows on-premises servers, which connect to SharePoint online using ClientID & ClientSecret and perform some background tasks, as ...
4 votes
1 answer
15k views

CAML Query to retrieve list item by title

I'm trying to query for only this the item called Test1. I'm using this caml query but I'm returning all items in the list for some reason. private static int GetlookUpId(List hrLookupList, string ...
0 votes
1 answer
140 views

Can I use a Claim variable and pass it into CSOM or PnP calls?

In my asp.net Core webapp, I'm putting the following into Startup.cs: public void ConfigureServices(IServiceCollection services) { services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)...
0 votes
1 answer
3k views

Authentication to SharePoint using secure authentication and CSOM in a .NET application

I'm using CSOM for making REST API calls to a SharePoint list from a C# application. This needs credentials (of course), however I've found that it needs a username and a password in plain text. ...
1 vote
0 answers
180 views

How to use Web.EnsureUserByObjectId method in SharePoint Online CSOM

I wasn't able to find anything about this method. Does anybody know how it works? public User EnsureUserByObjectId(Guid objectId, Guid tenantId, PrincipalType principalType); As I can understand from ...
0 votes
1 answer
16 views

How do I build an external .NET search engine that utilizes SharePoint Search with advanced/dynamic filtering?

On my website I want to build a .NET Core application which invokes the SharePoint Online search engine (using REST Service) while also meeting specific filtering conditions regarding the managed ...
1 vote
1 answer
841 views

Create Folder and Upload File to Document Library

I am new to this site so please feel free to redirect me to other posts that may answer my two part question. I am working on a .NET web form that needs to upload files from a asp:FileUpload ...
0 votes
1 answer
961 views

Graph SDK C# - PageIterator.IterateAsync() - Invalid filter clause

I am calling Graph with the SDK in C#, my initial request works fine and I get 200 results but the iterator returns an error with an invalid filter clause. The initial call with the filter works ...
0 votes
1 answer
214 views

SharePoint .Net CSOM Equivalent for Add-PnPFile

We have a requirement to use CSOM based .Net Managed Code to perform the upload file and set the metadata properties. However, we cannot upload and set the metadata properties simultaneously using ...
0 votes
1 answer
49 views

CSOM with netcore sending Notification Emails

Utilising the .net framework of the nugget package Microsoft.Sharepoint.Client we were able to send emails with the Utilities class. Is there any equivalent functionality in the .net standard nugget ...
0 votes
2 answers
44 views

Operations on a ContentTypeCollection object throwing an unexpected exception

I am developing a Console application to programmatically download documents from a SP site among other things. I am trying to retrieve the fields of a content type of a SP list using CSOM : using (...
0 votes
1 answer
528 views

Can we use CSOM inside .NET 5.0

I have created a new .NET 5.0 core console application >> but i am not sure if currently CSOM is supported inside .NET 5.0 ?
0 votes
1 answer
195 views

Assigning or creating customized permissions for user/groups of Sharepoint via REST API using c# asp.net core

I am trying to assign customized permissions to users/groups of SharePoint via the REST API. But from Microsft Graph we have only API to assign folder level permissions (read, write, full control). ...
0 votes
1 answer
993 views

How to download all of the files under a specific folder using CSOM from SharePoint Online?

I have a folder structure similar to this on our SharePoint Online site: Documents/ Drawings/ For Review/ Released/ Archived/ Documentation/ For Review/ ...
1 vote
1 answer
316 views

PnPjs alternatives for .NET

For developing with the SharePoint REST APIs using JavaScript I always use PnPjs because it's an easy way of getting data from SP. PnPjs is a collection of fluent libraries for consuming SharePoint, ...
0 votes
1 answer
588 views

How to make request to webapi in to Sharepoint Online(SPO) c#?

there is not solid documentation about how to make calls to sharepoint online web api, in MSN documentation it infers that you are developing an add-in for sharepoint, I'm just making a test in c#. I'...
0 votes
1 answer
325 views

Microsoft.NET.Sdk.Functions and SharePointPnPCoreOnline not compatible

I'm developing a simple Azure Function project that uses the NuGet package Microsoft.NET.Sdk.Functions (version 1.0.29) to trigger on incoming Azure Storage Queue message, and uses ...
0 votes
1 answer
844 views

Access denied on creating List with Graph API

I'm trying to create a new List in specific Site with my own Sharepoint Application and I'm getting Access denied error when I send the request to API. My application have Sites.ReadWrite.All, this is ...
0 votes
0 answers
325 views

I am to login on web-page on share-point site but when i try to access from C# getting wrong username or email Id error

Below is my C# code which I am using for connect SharePoint site. When I try to access same SharePoint site from web page it's working fine and I able to access it But when I try to with below code I ...
0 votes
2 answers
2k views

Issue getting context using AuthenticationManager

I am trying to get the context of my site using OfficeDevPnP.Core AuthenticationManager with the ClientID and ClientSecret var ClientId = "<>"; var ClientSecret = "<>"; ...
0 votes
1 answer
157 views

SharePoint 2013 server Setup error. Unable to proceed due to the following error(s): This product requires Microsoft .Net Framework 4.5 [duplicate]

I found that this problem occurs because the SharePoint Setup and Project Server Setup programs do not recognize the .NET Framework 4.6, 4.6.1, or 4.6.2 as a supported version of the .NET Framework.
1 vote
4 answers
25k views

jquery checkbox checked and unchecked

i need to write a javascript code that make the checkbox if checked view a textbox and if not checked the text box is invisable automatically without having a button to click on it to do that <...
0 votes
2 answers
1k views

Advantages for develop SharePoint in server side

I have a question about server-side development in SharePoint VS client side I would like to know whats the difference and advantages between develop an application using the server side vs ...
0 votes
1 answer
650 views

How to add the aspx.cs code to get the selected value of radio button as per the aspx page as shown in the screenshot below?

This is the code for retrieving the Question and options dynamically from SharePoint list. How to get the value of selected radio buttons and store it to a variable using the C# or SP code. Can anyone ...
1 vote
3 answers
2k views

Create navigation headings in SharePoint Online programatically

Is there a possibility to create headings with multiple links in the navigation bar (i.e. top link bar) in SharePoint online using c3 or PowerShell? My initial guess was to use ClientContext to gain ...
0 votes
1 answer
1k views

SharePoint installation error with .Net framework 4.5.5

I am in the middle of my SharePoint 2013 installation, after installing all the pre requisites I am getting an error with .Net framework stating that the installation requires .Net framework 4.5 and ...
2 votes
2 answers
2k views

Should I use Microsoft Graph or CSOM when integrating .NET with O365?

I have an existing integration based on CSOM, which I need to move from one .NET solution to another. In the process, I was made aware that Microsoft now has a graph API. I've tried to research ...
2 votes
0 answers
248 views

SaveBinaryDirect returns "Unable to connect to the remote server" when code is deployed to our production server

I am trying to use SaveBinaryDirect to upload a file to a Sharepoint Online library. Everything works perfectly on two different workstations I tried on (Windows 10), but once deployed to our UAT ...
0 votes
1 answer
695 views

403: Forbidden when trying to update item properties with SharePoint API

In my .NET Core API I'm trying to update a document library item property with the SharePoint API. I already succeeded to get the document library item by id and by filter. When I try to update an ...
0 votes
1 answer
83 views

Installing .Net Framework 4.6 on 1 server in a SharePoint 2013 farm

There is a SharePoint 2013 farm with 2 application servers and 3 web servers. For an assessment i need to install tooling that requires .Net Framework 4.6 (or higher). Currently .Net Framework 4.5.2 ...
1 vote
1 answer
22 views

Reference SharePoint inside a .Net core2.1 project

I have a solution that is targeting .Net Core2.1 Framework. Now inside I want to be able to query sharepoint list items. But I see I can't add Microsoft.SharePoint.dll in the project. I tried changing ...
1 vote
1 answer
50 views

How to migrate clssic pages in non site pages library to modern UI in SharePoint Onine

string siteUrl = "https://contoso.sharepoint.com/sites/mytestsite"; string targetSiteUrl = "https://contoso.sharepoint.com/sites/mytargetsite"; string userName = "[email protected]"; ...
0 votes
1 answer
384 views

Credential-connect to project server 2016

I get an error in thecontext.ExecuteQuery();line while trying to connect to the server. Console.WriteLine("Please enter your username for PWA"); userName = Console.ReadLine(); ...
1 vote
0 answers
63 views

Is it critical for a SharePoint Developer to understand JavaScript, HTML, CSS, .NET/C# & SharePoint Front End Fundamentals in order to be proficient? [closed]

I’m asking this because I’ve started a new job as a Jr. Software Developer. Currently the role has a heavy emphasis on SharePoint development, as the company hasn’t ever had a developer assist with ...
0 votes
1 answer
348 views

How to allow access to list item file attachments that was not created by the user with special constraints

I am struggling for some time with this problem and can't decide how to handle it. We have a sharepoint list with 3 groups of users: SOHO Account Managers SMB Account Managers ENT Account Managers ...
3 votes
1 answer
115 views

Do we need to maintain same .net version in all SharePoint servers?

We have SharePoint 2013 on premises farm with two web severs and three app servers on windows server 2008 R2. We required to install .NET Framework 4.6.2 on only web servers to be compatible with ...
1 vote
2 answers
3k views

Upload Multiple Documents to SharePoint Online using C#

I've been trying for a while to make this work, but I'm stuck. I've checked all the solutions around here and google, but can't seem to figure out why I keep getting an error. string targetFolder = "/...
1 vote
2 answers
1k views

SharePoint 2013 with .net framework 4.6.1

I am facing a requirement to install an external program on SharePoint environment. the program requires .net framework 4.6.1. Is there a problem in installing .net framework 4.6.1 on SharePoint ...
1 vote
1 answer
278 views

CSOM - Trying to access "Client_Title" from a page in a list - "The property/Field has not been initialized ..... "

I'm trying to access the "Client_Title/Page Title" from a page in Site Pages using Client Context and "listItemId". It seems that I'm not requesting or loading it the correct way. When debugging I ...
0 votes
1 answer
123 views

how to simple connect to my sharePoint and get all the documents ?

i need to write a C# code that can connect to my sharePoint and get all the documents and also upload some new document. I can't find any simple example code that can do it any help please .. ...