Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

274
Views
Microsoft graph : UnhandledPromiseRejectionWarning: PolyFillNotAvailable: Library cannot function without fetch. So, please provide polyfill for it

Microsoft graph throws the below exception when initializing the client using the access token

enter image description here

the access token was generated just before initializing the client & also the same token works in post-man

what is that I'm doing wrong?

code ๐Ÿ‘‡๐Ÿ‘‡

let graphClient = graph.Client.init({
        // Use the provided access token to authenticate
        // requests
        authProvider: (done) => {
            done(null, accessToken);
        }
    });

Post-man response ๐Ÿ‘‡๐Ÿ‘‡

enter image description here

over 4 years ago ยท Santiago Trujillo
1 answers
Answer question

0

Quoting the install guide:

import @microsoft/microsoft-graph-client into your module and also you will need polyfills for fetch like isomorphic-fetch.

Here is what you need to do.

npm install isomorphic-fetch
import "isomorphic-fetch"; OR require('isomorphic-fetch');
over 4 years ago ยท Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
ยฉ 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!