Skip to main content
Participating Frequently
October 15, 2025
Solved

Oauth2 Microsoft Products and Connectors

  • October 15, 2025
  • 15 replies
  • 222 views

I am having issues setting up a Oauth2 for Microsoft products. I cannot get a successful API call even though I am able to with client credentials in Postman. Have others been having issues with this? Is there something I’m missing. I’ve been following this guide amongst trying many other things: Connector | Microsoft Graph

    This topic has been closed for replies.
    Best answer by afleury

    @bblanch I had a similar issue with a different API using OAuth2. Try creating it via HTTP connectors first instead of trying to create the connection via the Agent Studio Action. I think it’s a bug with Agent Studio.

     

     

    15 replies

    rgeroulo
    Community Manager
    October 16, 2025

    Hi ​@bblanch! What error message are you getting when you use the connector?

    bblanchAuthor
    Participating Frequently
    October 16, 2025

    Hi ​@rgeroulo I believe it's been a 401 saying an empty authorization is invalid. It also seems like my connectors are not being saved correctly because after I save them and test them in an HTTP action I also get -1 invalid URL: ‘’. Thanks for your response!

    Kevin Mok
    Community Manager
    October 16, 2025

    @bblanch Can you show us screenshots of your implementation, redacting any sensitive information? Without screenshots or evidence of your implementation, it will be tough for us to help you.

    bblanchAuthor
    Participating Frequently
    October 17, 2025

    Here are some pictures. I really appreciate the help!

    Angus Walker
    Inspiring
    October 17, 2025

    Hi ​@bblanch 

    My setup (which works) is pretty much identical to yours with a couple of changes.

    1. I dont have V1.0 at the end of my Base URL: 

       

    2. I have the Resource value in the Additional Request Data, not Additional Headers:

       

    I also don’t have the Client Credentials in the Additional headers, as it’s stipulated higher up.

    Hope this helps.
     

    Angus Walker
    bblanchAuthor
    Participating Frequently
    October 20, 2025

    Unfortunately, that set up is not working for me either. I am getting an identical error message for some reason. Would I need to include the auth token in the body or header manually? I appreciate the response ​@Angus Walker 

    Kevin Mok
    Community Manager
    October 20, 2025

    Set the following:

    • Client Credentials Grant Scope: https://graph.microsoft.com/.default

    • Oauth2 Custom Oauth Request Options Additional Headers:

      • Key: Content-Type

      • Value: application/x-www-form-urlencoded

    bblanchAuthor
    Participating Frequently
    October 20, 2025

    I am getting the same response after trying that. Would anything else need to change from the last screenshot I sent @Kevin Mok? ​

     

    Angus Walker
    Inspiring
    October 20, 2025

    I just noticed another difference with my setup:
     

    and all these blank:
     

     

    Angus Walker
    bblanchAuthor
    Participating Frequently
    October 20, 2025

    Still getting that same response code for some reason ​@Angus Walker 😕