Login | Access ServiceDesk APIs over Azure Pre Auth with Entra ID as Pre Authentication

Login | Access ServiceDesk APIs over Azure Pre Auth with Entra ID as Pre Authentication

Challenge:

When the application is hosted over Azure Pre Authentication with Entra ID as Pre-Authentication, all the REST APIs would fail to work.

Workaround:

As suggested by Microsoft, we can obtain the id_token by using the scope openid,offline_access to their OAuth URLs and send the id token as Authorization header like below when making the API calls through the API client like PostMan.
Info
"Authorization": "Bearer {{id_token}}"

We can also refresh this access token, id_token via this:
Info
POST {{token_url}}
grant_type: "refresh_token"
client_id: "{{client_id}}"
client_secret: "{{client_secret}}"
refresh_token: "{{refresh_token}}"