GithubHelp home page GithubHelp logo

sharepoint-nodejs / awesome-sharepoint-node.js Goto Github PK

View Code? Open in Web Editor NEW
96.0 10.0 11.0 54 KB

A collection of libraries and tools for Node.js runtime dealing with SharePoint

TypeScript 100.00%
sharepoint javascript typescript nodejs awesome awesome-list

awesome-sharepoint-node.js's People

Contributors

koltyakov avatar s-kainet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awesome-sharepoint-node.js's Issues

The list of potential projects

The list of potential projects I found on npm:

  • CSOMNode
  • gd-sprest
  • generator-spcaf
  • gulp-spcolor2scss
  • gulp-spsync
  • gulp-spsync-creds
  • gulp-spcolor-stylus
  • node-sppkg-deploy
  • passport-sharepoint
  • sharepoint-extractor
  • sharepoint-file
  • sharepointplus
  • sharepointconnector
  • spfx-build-url-rewrite
  • spfx-extensions-cli
  • spcmd
  • sprestlib
  • spscript
  • sp-wiki-to-docx
  • gulp-spcolor-stylus
  • spdeployment
  • sp-workbench-api-proxy
  • @beyond-sharepoint/spo-shell
  • generator-portals-clientside

The main goal of this Awesome-* repository is to provide a list of proven Node.JS modules for using with SharePoint. Ideally module should be used by community with significant downloads amount (let it be > 100 per month at the beginning, it's too small, but it's ok for such unique combination like SharePoint and Node.JS) or a new module which provides some unique functionality. We are not collecting all SharePoint related modules from npm, we are just trying to distinguish the most useful.
Therefore I'm proposing below criteria for rejecting module (if at least one criteria is satisfied, module get rejected):

  1. updated more than 4 years ago
  2. updated more than 2 years ago and doesn't have significant downloads count per month (> 100)
  3. doesn't have valid readme file or any web site with description how to use it
  4. doesn't have significant downloads and at the same time might be replaced with existing well-known module
  5. can be used in a browser only, without any exception

AADSTS50058: A silent sign-in request was sent but no user is signed in

StatusCodeError: 400 - "{"error":"invalid_grant","error_description":"AADSTS50058: A silent sign-in request was sent but no user is signed in.\r\nTrace ID: 05db5c6a-155c-4870-9bca-a518b5931900\r\nCorrelation ID: 1e8372d0-c1ba-4070-88d7-597e9cb5cb2c\r\nTimestamp: 2019-08-14 12:04:42Z","error_codes":[50058],"timestamp":"2019-08-14 12:04:42Z","trace_id":"05db5c6a-155c-4870-9bca-a518b5931900","correlation_id":"1e8372d0-c1ba-4070-88d7-597e9cb5cb2c","error_uri":"https://login.microsoftonline.com/error?code=50058\"}"

URL= 'https://login.microsoftonline.com/' + process.env.TENANT_ID + '/oauth2/token',

I am trying to implement azure login in nodejs scheduler app, and then want to upload file to sharepoint.
First i need to login, then get accesstoken,refresh token, admin accesstoken etc.
When i try to get accesstoken , i got error like this.
Can you help me.
Here no use of any front end.

async function init(parsedBody) {
var jwtToken = await sharepointAuth.getJWTToken(parsedBody);
console.log("jwtToken:",jwtToken)
const config = {
JWK_URI: appConstants.JWK_URI,
ISS: appConstants.ISS,
AUD: appConstants.conf.AUD,
};
console.log(config)
await azureJWT.verify(jwtToken, config).then(async () => {
console.log("----------------------------------")
var fileName = 'analytics.min.js';
var filePath = './public/analytics.min.js';
var userAccessToken = await sharepointAuth.getAccessToken(jwtToken);
console.log("userAccessToken:", userAccessToken);
var accessTokenObj = await sharepointAuth.getAdminAccessToken();
accessToken = accessTokenObj.access_token;
console.log("accessToken:", accessToken)
fs.readFile(filePath, { encoding: null }, function (err, data) {
const relativeUrl = web/GetFolderByServerRelativeUrl('${selectedFolderName}');
const SHAREPOINT_HEADER = {
'Authorization': Bearer ${accessToken},
"Content-Type": application/json;odata=verbose,
'Accept': 'application/json;odata=verbose',
}
const options = {
method: "POST",
uri: ${SHAREPOINT_URI}${relativeUrl}/Files/add(url='${fileName}',overwrite=true),
headers: SHAREPOINT_HEADER,
body: data
};
console.log(options)
rp(options)
.then(() => {
// POST succeeded...
console.log('File uploaded!');
})
.catch((error) => {
// POST failed...
console.log("File Upload Error: ", error.toString());
});
});
});
}
const request = require("request");
const endpoint = "https://login.microsoftonline.com/tenentId/oauth2/token";
const requestParams = {
grant_type: "client_credentials",
client_id: "ClientId",
client_secret: "Secret",
resource: "ClientId"
};

request.post({ url: endpoint, form: requestParams }, function (err, response, body) {
if (err) {
console.log("error");
}
else {
console.log("Body=" + body);
let parsedBody = JSON.parse(body);
if (parsedBody.error_description) {
console.log("Error=" + parsedBody.error_description);
}
else {
console.log("parsedBody : " + parsedBody);
console.log("Access Token=" + parsedBody.access_token);
init(parsedBody);
}
}
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.