I want to create my GraphQL page and connect it via M to PowerBI to visualize. This is my code:
But my error, after signing in the error is this: Expression.Error: Access to the resource is forbidden. My graphQL query seems to work well.
In my Postman collection I also have the variables in my bode called scope and grant_type, but I'm pretty new to this.
let
url = "link",
client_id = "xxxxxxxxxxxxxxxx",
client_secret = "xxxxxxxxxxxxxxxxx",
Source = Web.Contents(
url,
[
Headers=[
#"Method"="POST",
#"Content-Type"="application/json",
#"client_id"=client_id,
#"client_secret"=client_secret
],
Content=Text.ToBinary("{""query"": ""{ manufacturingOrders {id product {id description} comment priority }}""}")
]
),
#"JSON" = Json.Document(Source)
in
JSON