web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Custom Connector OAUTH...
Power Automate
Unanswered

Custom Connector OAUTH not sending/requesting authorization token

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I am trying to create a custom connector to connect to the Google Analytics Reporting API. For this I need to authenticate using OAUTH 2.0, I then use the "Google format" for the authorization, Once I complete all the other steps correctly (already done it with mock servers using postman) I arrive at the test but keep getting a 401 with the body telling me I need to authenticate. Which is weird because since I set up the authorization tab it should do it on its own. Just seems like the connector never request the authorization token. Maybe I am mising a step but I have seen anything making me think so.

I know the URI are all fine since via Postman I can make it work. Just can't seem to make it work with the Connector and the Google API.

Any ideas are welcome and thank you for your help.

Categories:
  • murshed Profile Picture
    Microsoft Employee on at

    Hi @Anonymous 

    Can you please tell me more what you mean by "Google format" for the authorization?
    The authorization tab is for defining how to authenticate. When you are testing or using it you will need to create a connection based on the definition in the authorization tab. If you can share the screenshot of the authorization and postman configuration I might be able to provide more context.

     

    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 👍.

  • shyamsu Profile Picture
    Microsoft Employee on at

    As per the google docs : https://developers.google.com/analytics/devguides/reporting/core/v4/authorization 

    Google Analytics Reporting API uses standard OAuth 2.0. You will need to create an app in google API console which may require approval from Google. Once you app is approved, it will give you clientId and secret. You need to specify this in the security tab of the custom connector along with other parameters (e.g. Authorization url, token url etc.). Once custom connector is created, for using it, as @murshed  said, you will need to create a connection. When a connection is created PowerAutomate will automatically fetch/refresh the access token using the setting defined in the security tab of the custom connector

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    CedricS_0-1605533132975.png

    This is the authorization tab. I do have the client ID and Client secret from ten APP i registered within Google Analytics Reporting.
    The google format is the drop down list "Fournisseur d'identité" (sorry for the layout being in French), I can't choose anything else because the API doesn't give me a refresh token URI as requested with the Raw OAUTH2 option.
    So once I get all the correct information in the inputs, once I get to the test tab I run the test and get a 401 response : 

    {
    "error": {
    "code": 401,
    "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
    "status": "UNAUTHENTICATED"
    }
    }

     

    Whereas through postman since it demands a user input to get the token I don't have any problems getting the token anyway and the URIs match those I put in the connector.
    It just seems like the connector is not requesting or not sending the token. Am I missing a step ?

    Thanks for the Help.

  • shyamsu Profile Picture
    Microsoft Employee on at

    @Anonymous do you have clientRequestId of the failed request (it should be in the failed response) if not, can you please send me your custom connector URL and approx time of the failure?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @shyamsu I don't see any parameters like that in the response. Here see the URL : https://make.powerapps.com/environments/0c2c8cc1-2232-4f0d-91f4-fe29f40d2f2d/customconnectors

     

    EDIT : As for the time I just did a request some minutes ago

     

    On a side note, if I use the editor swagger to authorize myself manually, and then do the request everything works well.

  • shyamsu Profile Picture
    Microsoft Employee on at

    @Anonymous can you please click edit next to your custom connector and then send me the URL? That URL will have Id of custom connector which i can use to look into telemetry

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @shyamsu The url isn't changing once I edit tho. it just opens the settings without adding a path. Is there a way to get the Id from another source ? or share the connector ?

  • shyamsu Profile Picture
    Microsoft Employee on at

    @Anonymous can you please send me just the name of the custom connector. I can try to look for that.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello Sorry for the delay, the name is "RESAH_STATS_EA" on this URL: https://make.powerapps.com/environments/0c2c8cc1-2232-4f0d-91f4-fe29f40d2f2d/customconnectors

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 227 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 213 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 151

Last 30 days Overall leaderboard