Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
alexbjorlig
Helper IV
Helper IV

When developing a custom data connector for a GraphQL API, are there any oAuth examples?

I'm trying to develop a custom data connector that accesses a GraphQl API, using oAuth.

 

The first time it works great, I get a token and query data!

 

But when the token expires, the API responds with the following payload: 

 

 

 

{
  "errors": [
    {
      "name": "GraphQLError",
      "message": "No valid session could be found, please reauthenticate",
      "path": [
        "roles"
      ],
      "code": "token-invalid",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ]
    }
  ],
  "data": null
}

 

 

 

And then nothing works - the refresh token apparently not being used.

 

How can I tell the extensions oAuth package that it should retrive a new access_token?

 

Thanks in advance, 

 

/Alex

 

Update 

 

In the end I gave up and changed the GraphQl API to return statusCode 401 --> now it works.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @alexbjorlig ,

Is there anything else need to help with regarding this thread? If no, could you please mark your post as Answered? It will help the others in the community find the solution easily when they face the same problem with you. Thank you.

Best Regards

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @alexbjorlig ,

Is there anything else need to help with regarding this thread? If no, could you please mark your post as Answered? It will help the others in the community find the solution easily when they face the same problem with you. Thank you.

Best Regards

Where do I mark is as Answered?

Anonymous
Not applicable

Hi @alexbjorlig ,

You can click the button "Accept as Solution" under the helpful post to mark it as Answered.

yingyinr_0-1619488732877.png

Best Regards

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.