2022 Developer Survey is open! Take survey.

Hot answers tagged

8 votes
Accepted

How to use SharePoint RESTful web services with Node.js?

It depends heavily on your requirements and on the app type you are going to build (web application or just console daemon, azure function, etc.). Does it require user context or not? Here are the ...
user avatar
6 votes
Accepted

Unable to setup SharePoint Framework Dev Environment: TypeError: lookup.flatMap is not a function

This is the issue related to yeoman. You can fix this issue by downgrading it from 4.0.0 to 3.1.1 npm install yo@3.1.1 -g This combination does not work @microsoft/generator-sharepoint@1.11.0 gulp@4....
user avatar
5 votes

How to actually use webhooks, GetChanges and GetListItemChangesSinceToken?

I have created a solution. I'm not 100% sure if it is a good one, but it works. It only works on SharePoint Online. The demo code below is run using tick directly on a SharePoint site in Chrome. I ...
user avatar
  • 7,395
3 votes
Accepted

Cannot import a Web Part Using REST getlimitedwebpartmanager(1)/ImportWebPart

Looks like it's impossible to add a web part to the page over REST at this moment. What a shame. The AddWebPart_Client method of the SPLimitedWebPartManager class is the client-side equivalent of ...
user avatar
3 votes

How to make a rest call to SharePoint 2013 from node.js?

You can also try sp-request With sp-request you can easily send REST queires: var spr = require('sp-request').create(credentialOptions); spr.get('http://sp2013dev/sites/dev/_api/web/lists/...
user avatar
3 votes
Accepted

Download sharepoint document with REST as binary file not working for me

Ok i found the problem... First: The API calls were both correct. The fact is that I am developing with Nodejs and I realized that the request module automatically converts the result to utf8 as the ...
user avatar
  • 343
2 votes
Accepted

REST to create a Sharepoint List in Node.js hosted offsite

Consider using sp-request module for that purpose. Your code will be: var sprequest = require('sp-request'); var creds = { username: 'johndoe@contoso.onmicrosoft.com', password: 'mycoolpass'...
user avatar
2 votes
Accepted

SharePoint Online Workbench Question

When you run the command gulp serve it builds the solution and copy the assets and starts the service. If you see your command prompt there is API server running in the background to serve the web ...
user avatar
2 votes
Accepted

Integrating Azure custom BOT on SharePoint home page

Edit - Without Iframe option. You can also use directline to customize web chat UI. For react below is sample from MS documentation(link) To install the production build from NPM, run 'npm install ...
user avatar
2 votes
Accepted

What are the alternatives to authenticate in SharePoint beyond AD to use the Rest API?

For SharePoint Online and username + password authentication, you can try using my sp-request module. It's for SharePoint primarily, however, works for MS Project as well.
user avatar
2 votes

Sharepoint REST API Download File Using NodeJs

There are some libraries available for such a task. For example consider sppull. With sppull you can easily download file with just a few lines of code: var sppull = require("sppull").sppull; var ...
user avatar
2 votes
Accepted

SPFx development - npm audit vulnerabilities

With SPFx solutions, none of the npm packages are deployed to SharePoint, so you can ignore these audit warnings. If you had a custom solution that did deploy the npm packages themselves, yes you'd ...
user avatar
  • 28.8k
2 votes

SPFx -DO I need all of the node_modules for every new webpart I build?

You can add new web part on your existing solution by executing below command in the existing solution directory. yo @microsoft/sharepoint https://blog.mastykarz.nl/add-second-web-part-sharepoint-...
user avatar
  • 176
1 vote
Accepted

gulp build is raising this Error - [tslint] Error: Cannot find module '@microsoft/rush-stack-compiler-3.2'

This is a computability issue. SharePoint Framework (SPFx) 1.7.1 requires the following node.js LTS 8.x npm v5, v6 yeoman yo@3.1.1. (for creating new projects only) This is what you have. It won't ...
user avatar
1 vote

Unable to setup SharePoint Framework Dev Environment: TypeError: lookup.flatMap is not a function

I am assuming that you have installed only one version of nodejs at a time. For SPFx generator SharePoint online you will require v10.24.0 of nodejs. Open command prompt and run following command in ...
user avatar
1 vote

Failed to load component dependency "react" with failover path "node_modules/react/dist/react.js" in workbench

It's been happening to me as well. As a workaround, I've modified the spfx bundling process to tell it explicitly where to look for react and react-dom by defining them like other externals (after ...
user avatar
  • 11
1 vote
Accepted

Sharepoint 2013 authentication node js

Consider sp-request module. It does all authentication for you. You can use REST API without thinking about the auth: import * as sprequest from 'sp-request'; let spr = sprequest.create(...
user avatar
1 vote
Accepted

gulp serve error

Please refer the official document here: Set up your SharePoint Framework development environment Use Node.js v10.x. Install Yeoman and gulp: npm install -g yo gulp Install Yeoman SharePoint ...
user avatar
  • 2,483
1 vote

node js -> Sharepoint behind proxy

The documentation of PnPJS shows how to set a proxy URL when performing the setup: https://pnp.github.io/pnpjs/nodejs/docs/proxy/ import { SPFetchClient, SPOAuthEnv, setProxyUrl } from "@pnp/nodejs"; ...
user avatar
  • 785
1 vote
Accepted

ts Cannot find the module

It looks like it is bug in visual studio code or may be in yomean or may be in typescript because when I run gulp serve it compile web part and resolve the issue by it self. Hope this can help ...
user avatar
  • 1,519
1 vote
Accepted

SharePoint 2016 On Premise Dev using SharePoint Framework

Install SharePoint Feature Pack 2 from here: security update for SharePoint Server 2016: September 12, 2017 This update allows SPFX Development in SharePoint 2016 on-premise.
user avatar
  • 2,483
1 vote
Accepted

SharePoint Framework (SPFx) information questions

Yes. The points you mentioned are few advantages out of all. You can read the Key Features. The Node.Js is a cross-platform JavaScript runtime engine which plays the same role as .Net CLR in the .Net ...
user avatar
1 vote

SharePoint Framework (SPFx) information questions

Please go through this article. This article discuss some advantages and disadvantages about SPFx which can help you. Overall the article discuss following advantage of SPFx: Complete Client Side. ...
user avatar
  • 2,930
1 vote

Error while using gulp-spsync with SharePoint Framework

When using this gulp task, is it actually uploading files? If yes, can you do a quick change in one of the source files to check if it can fix it? In the node_modules folder, look for a folder named ...
user avatar
  • 1,683
1 vote

How to use Node.js in SharePoint 2013 web front end architecture?

This doesn't sound SharePoint specific, however that said I think you should consider this problem in the same category as something like session state in a similar configuration. You need to store ...
user avatar
1 vote
Accepted

Sharepoint 2013 and Node.js upload functionality for Sharepoint

There is a specific library for SharePoint. You can download it from https://github.com/lstak/node-sharepoint Then use it as contacts.add({LastName: 'Picolet', FirstName: 'Emma'}, function (err, ...
user avatar
  • 28.2k
1 vote

how to update managed metadata fields using rest?

Are you using the correct format? A metadata field value is organized like this: "cachelistid";#"displayname"|"guid" If this caching list id (forgot the exact name of this) is not available or if ...
user avatar
1 vote

OAuth Authentication and Authorization to REST API from a Node.js Javascript program

For those who are still looking for the answer - consider sp-request nodejs module. It allows you to perform OAuth client credentials grant (in different terminilogy it's also called addin-only ...
user avatar
1 vote

OAuth Authentication and Authorization to REST API from a Node.js Javascript program

This was the exact problem I was facing. This is an old question but my answer might be helpful to someone else coming here. It is possible to do OAuth from Node.js or any other web-app. Here are ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible