Question
· Nov 20

OAuth2 with Microsoft

Hello Community,

I'm starting to explore OAuth2 and, as a first step, I want to set up an OAuth2 authentication with Microsoft. I've created a small sample page that attempts to sign in with Microsoft. However, after entering the user credentials, the redirection doesn't work.

 
Die Einstellungen im Managment Portal sehen wie folgt aus:

System>Security Management>OAuth 2.0 Client>Create Server Description:
   
System>Security Management>OAuth 2.0 Client>Client Configurations
 


The redirect URI is also registered in Azure, and the web application "/csp/sys/oauth2" is activated.

What could be the reason that it's still not working?

Best regards,
Daniel Goerke

Product version: IRIS 2024.1
$ZV: IRIS for Windows (x86-64) 2024.1.1 (Build 347_0_23678U) Mon Sep 16 2024 18:42:43 EDT
Discussion (5)5
Log in or sign up to continue

@Tani Frankel, @Scott Roth 

I have activated the relevant logging and implemented a small function to log the requests. Below, I will share both log outputs.
It appears that not all parameters are being passed to the OAuth2.Response class. At the moment, I am unsure what might be causing this issue.

IRIS Log:

 
Spoiler

Request Log:

 
Spoiler

Hi Daniel.

This 404 error shows IIS page. For the debugging purposes the recommendation is to enable PassThrough responses in IIS:
https://docs.intersystems.com/iris20242/csp/docbook/DocBook.UI.Page.cls?...

IRIS returns 404 when the page or class does not exist, and when PROTECT error happens.

So enable the PROTECT events in the Audit, and check if anything is logged there

Check that IIS is configured correctly to forward the request that returns 404 to the Web Gateway and then IRIS