Recent searches
No recent searches
OAuth App Receiving 401 Error
Posted Jan 13, 2022
I have an OAuth enabled app that is successfully authenticating to Azure AD but is receiving authorization errors when accessing MS Dynamics CDS through the Zendesk Proxy.
On the Zendesk side, the app is successfully authenticating using my App Registration in Azure. Using the same settings in Postman, I am able to authenticate and also query data, whereas in the Zendesk app I receive a 401 unauthorized error.
I followed this ZD guide to add OAuth to my app.
https://developer.zendesk.com/documentation/apps/app-developer-guide/using-the-apps-framework/
My best guess is that it is related to the OAuth grant type and that the Zendesk app is getting the wrong type of token from my Azure App Registration.
Failed Web Request:
zendesk_powerapps_connector_web.PNG
Postman - Authorization Settings:
zendesk_powerapps_connector_auth.PNG
Postman - Variables Used:
zendesk_powerapps_connector_vars.PNG
Postman - Successful Response:
zendesk_powerapps_connector_res.PNG
Zendesk - App Manifest:
zendesk_powerapps_connector_zd_manifest.PNG
Zendesk - Successful App Authentication:
zendesk_powerapps_connector_sshot1.PNG
0
5 comments
Samer Kokeh
Hi,
I have the same problem, did you find a solution ?
Thank you,
Samer
0
Taylor Artunian
I think what ended up making it work for me was setting the OAuth scope to:
0
Samer Kokeh
Thank you for information Taylor, just I want to make sure if you put the call back url on azure active directory as https://zis.zendesk.com/api/services/zis/connections/oauth/callback
because i always receive 422 error
"Proxy error: {:code=>\"UnprocessableEntity\", :status=>\"422\", :title=>\"Unprocessable Entity\", :message=>\"Failed to get installation and oauth information for app.\"}"
I think i did everything well, it's really strange.
0
Taylor Artunian
That is the same callback url that I used in Azure. I also set it as Web platform (not single-page) and enabled Access tokens (not ID tokens).
I remember getting the 422 error, but I just can't remember what caused it.
0
Samer Kokeh
Thank you Taylor, I've solved the problem.
Mainly to test your OAuth settings, you have to install the app. because OAuth settings can't be test during the design.
BTW, I used following parameters, it didn't work with me with type: oauth.
0