Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error while authenticating with fba #99

Open
azamsolix opened this issue Jun 1, 2021 · 1 comment
Open

Getting error while authenticating with fba #99

azamsolix opened this issue Jun 1, 2021 · 1 comment

Comments

@azamsolix
Copy link

Hi,
I am getting getting while doing authenticating with fba.

Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: 4

@azamsolix
Copy link
Author

const spauth=require('node-sp-auth');
const request = require('request-promise');
spauth
.getAuth('http://sharepoint20/sites/ecs', {
username: 'username',
password: 'aaaa@123!',
fba : true
})
.then(data => {
let headers = data.headers;
headers['Accept'] = 'application/json;odata=verbose';

request.get({
  url: 'http://sharepoint20/sites/ecs/_api/web',
  headers: headers,
  json: true,
  rejectUnauthorized: false
}).then(response => {
  console.log(response.d.Title);
});

});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant