Genesys Cloud - Main

 View Only
Discussion Thread View
  • 1.  Microsoft Oauth Requests

    Posted 07-01-2020 07:51
    Hi All, 

    I'm working on a Microsoft integration but having trouble with the initial oauth request for a token. This is one of those "it works in postman" situations, but for some reason Genesys does not like it. 

    Upshot is that i'm getting a 404 error back saying that the resource wasn't found, but the request url is accessible via both my browser as well as postman. I have an issue open with MS, but they're inclined to say it's Genesys per postman working. 

    Url is like so: https://login.microsoftonline.com/[instanceid]/oauth2/v2.0/token

    Has anyone set oauth up with MS? The use cases here are many. 

    Thanks!
    #Integrations

    ------------------------------
    Dean Thames
    Koch Business Solutions
    ------------------------------


  • 2.  RE: Microsoft Oauth Requests

    GENESYS
    Posted 07-06-2020 14:32

    Based on dev notes with MS, it appears that they don't like the chunked encoding, and you may try to add the "transfer-encoding": "buffered" header to your auth request, as suggested here: https://help.mypurecloud.com/articles/custom-action-fails-for-unexpected-reason/#:~:text=By%20default%2C%20PureCloud%20encodes%20the,as%20Transfer%2DEncoding%3A%20chunked.&text=If%20you%20set%20Transfer%2DEncoding,a%20single%20request%20or%20response.



    ------------------------------
    Richard Schott
    Genesys - Employees
    ------------------------------



  • 3.  RE: Microsoft Oauth Requests

    Posted 07-07-2020 06:51
    It worked! Thanks Richard!

    I had seen that post a while back while working on another issue, but it didn't help at that time... resolution on that one was "accept":"appliation/json". So I forgot about this one. 

    Headers now look like: 

    "Authorization": "Basic $encoding.base64(\"${credentials.clientId}:${credentials.clientSecret}\")",
    "Content-Type": "application/x-www-form-urlencoded",
    "transfer-encoding": "buffered"



    ------------------------------
    Dean Thames
    Koch Business Solutions
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources