0

following answer https://stackoverflow.com/a/28330504/4645059

I am trying to return token from my local oauth2 compatible OWIN middle-ware.

Once I am trying to authenticate ,power query opens my authentication window and after credentials has been inserted my middle-ware returns the following json object

{ access_token: "sampletoken", token_type: "bearer", expires_in: 28799 }

The content type is application/json, in this case power query browser window trying to download the json response as a file (usual internet explorer behaviour to json response).

So my question is: what exact response is expected by powerquery?

Community
  • 1
  • 1
Alexey Auslender
  • 402
  • 5
  • 18

1 Answers1

0

Power Query can format JSON bytes into an M record. You could do this yourself with the library function Json.Document:

Json.Document("{ access_token: ""sampletoken"", token_type: ""bearer"", expires_in: 28799 }")

I'm not sure if this will help you with the OAuth2 flow though. There's no way to add an unsupported authentication flow into Power Query today.

Carl Walsh
  • 6,100
  • 2
  • 46
  • 50