Javascript error "cannot read property scopes of undefined: Sharepoint External Data Source With Authentication

  • 1
  • Problem
  • Updated 4 years ago
  • Solved
I am attempting to interact with Sharepoint Online using OAuth authentication.  When setting up a model, a javascript exception is encountered when a "lookup" is being performed on the External Object Name.

Uncaught TypeError: Cannot read property 'scopes' of undefined

I'm not sure if I have the Authentication configured incorrectly, the model service configured incorrectly or if this is a bug.  Based on reviewing the code, it appears this might be a bug but I wouldn't be surprised if it's a config issue on my end.  The sharepoint tutortial doesn't cover authentication setup and troubleshooting the different layers is difficult without documentation to cover all the possible settings.

The following line of code is where the exception occurs.  If I'm reading the code correctly, authenticate is called without passing any parameters therefore b & c are both undefined which results in the exception on "b.scopes".

r = (c && c.scopes ? c.scopes : b.scopes || "").split(",")

I've granted login access and will email support the Org ID.

Thank you!

Photo of Barry Schnell

Barry Schnell, Champion

  • 18,376 Points 10k badge 2x thumb

Posted 4 years ago

  • 1
Photo of J.

J., Official Rep

  • 7,846 Points 5k badge 2x thumb
Official Response

Good news: this will be fixed in Banzai Update 6. Thanks again for helping us track down issues like this!