Showing results for 
Search instead for 
Did you mean: 
Helper II
Helper II

Custom Connector - getting OAUTH2 access token

I'm working on a Custom Connector to connect to the Withings API to retrieve daily weight data from a Withings Wi-fi enabled scale like one of these:


The API uses OAuth 2.0 for authentication.  I've been experimenting with Postman as well as with building a custom connector for the Power Platform, but I haven't been able to get the latter to work.  I have a theory why this might be, and wondered if anyone could tell me whether I'm on the right track.


I can request authorisation for the user, and that part is working fine.  However, when an Access Token is requested from the API, it returns it in the following format (see  The following is returned as the body of the response:




According to the RFC for OAuth2, the format of the JSON returned should be just the contents of the "body" object of the JSON above:


Could this be why my Custom Connector isn't working properly?



Hi @Interlock 

It sounds like your custom connector is handling the authentication request. Can you please explain a little bit more? Ideally, you would define the authentication for the custom connector and flow takes care of the authentication based on the definition. The decoupling has a lot benefits - a connector can work for multiple users in a more secure way.

If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION ☑️. If you find this reply helpful, please consider giving it a LIKE 👍.

Hi @murshed, well I'm wondering if the fact that the Withings API is returning a response which appears not to strictly conform to the OAUTH2 definition might be the reason that my custom connector isn't working.  I wasn't able to find any way of debugging Custom Connectors, so it's hard to know what's actually happening "under the hood" when things don't work.


Anyway, I've worked around the problem by using a Power App and a couple of Flows to handle the OAUTH2 functionality, along with the quirks of this particular API.  Luckily I don't need multi-user access for this particular application.


Thanks for your help.

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,872)