# Auth.pritunl.com/callback/azure 500 error

**URL:** <https://forum.pritunl.com/t/auth-pritunl-com-callback-azure-500-error/3171>\
**Category:** Pritunl VPN\
**Tags:** pritunl, pritunl-client\
**Created:** [April 1, 2025, 9:30pm UTC](https://forum.pritunl.com/t/auth-pritunl-com-callback-azure-500-error/3171 "2025-04-01T21:30:55Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmvdz](https://forum.pritunl.com/user_avatar/forum.pritunl.com/lmvdz/32/179_2.png) [@lmvdz](https://forum.pritunl.com/u/lmvdz)\
**Post date:** [April 1, 2025, 9:30pm UTC](https://forum.pritunl.com/t/auth-pritunl-com-callback-azure-500-error/3171/1 "2025-04-01T21:30:55Z")

</div>

Hi we’re getting an error today with the [auth.pritunl.com/callback/azure](http://auth.pritunl.com/callback/azure) endpoint when SOME of our users login via SSO.

We’ve rotated the Azure Secret just in case and still getting this error.

This is the error from the server:

[2025-04-01 21:21:06,409][ERROR] Azure auth check request error  
user\_id = “60abe6c131a3d007176ece1c”  
user\_name = “[user@domain.com](mailto:user@domain.com)”  
status\_code = 500  
content = “b’'”

---

<div class="post-metadata">

**Author:** ![lmvdz](https://forum.pritunl.com/user_avatar/forum.pritunl.com/lmvdz/32/179_2.png) [@lmvdz](https://forum.pritunl.com/u/lmvdz)\
**Post date:** [April 1, 2025, 9:55pm UTC](https://forum.pritunl.com/t/auth-pritunl-com-callback-azure-500-error/3171/2 "2025-04-01T21:55:35Z")

</div>

Also what was the design decision to use [auth.pritunl.com](http://auth.pritunl.com) as the redirect URI instead of our own hosted pritunl server address?

---

<div class="post-metadata">

**Author:** ![lmvdz](https://forum.pritunl.com/user_avatar/forum.pritunl.com/lmvdz/32/179_2.png) [@lmvdz](https://forum.pritunl.com/u/lmvdz)\
**Post date:** [April 1, 2025, 10:23pm UTC](https://forum.pritunl.com/t/auth-pritunl-com-callback-azure-500-error/3171/3 "2025-04-01T22:23:16Z")

</div>

> <https://github.com/pritunl/pritunl/blob/665c951e5017213882eb810c0f7c843887895596/pritunl/user/user.py#L432>

I’ve found the place where the error is being emitted, tried calling the url in Postman and was getting a 500 error for the problematic user, and 200 for a user who is able to login.

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [April 1, 2025, 11:13pm UTC](https://forum.pritunl.com/t/auth-pritunl-com-callback-azure-500-error/3171/4 "2025-04-01T23:13:06Z")

</div>

If the user hasn’t logged into the web console in a long time and single sign-on connection authentication is not used the OAuth token may have expired. They will need to login from the web console to perform a full OAuth authorization.

The authentication servers make the configuration simpler and avoid problems that can occur with multiple hosts that don’t have a load balancer for the web console. It also protects the paid features. If you are worried about third parties handling authentication, [**device authentication**](https://docs.pritunl.com/docs/device-authentication) can be used to verify the user’s physical device using the TPM or Secure Enclave without any third party single sign-on. The [**high security environment**](https://docs.pritunl.com/docs/high-security) documentation has information on all the additional security options.

---

<div class="post-metadata">

**Author:** ![lmvdz](https://forum.pritunl.com/user_avatar/forum.pritunl.com/lmvdz/32/179_2.png) [@lmvdz](https://forum.pritunl.com/u/lmvdz)\
**Post date:** [April 2, 2025, 1:37am UTC](https://forum.pritunl.com/t/auth-pritunl-com-callback-azure-500-error/3171/5 "2025-04-02T01:37:59Z")

</div>

Hi, even when these effected users go through the web console performing a full OAuth authorization, by clicking the SSO Sign in Via Azure button, they are able to login to Azure but get a similar 500 error at the callback step

---

<div class="post-metadata">

**Author:** ![fregatte](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/f/c67d28/32.png) [@fregatte](https://forum.pritunl.com/u/fregatte)\
**Post date:** [April 2, 2025, 8:25am UTC](https://forum.pritunl.com/t/auth-pritunl-com-callback-azure-500-error/3171/6 "2025-04-02T08:25:56Z")

</div>

Hi, we have the same issue from yesterday. Some users cannot use Pritunl VPN with an AUTH\_FAILED error. The logs show “Azure auth check request error” for the problem users. The Azure secret for Pritunl has been checked and is not expired.  
In case these users try to log in to the pritunl web-console, they receive 500 with the error “[auth.pritunl.com](http://auth.pritunl.com) can’t currently handle this request”.  
Are there any suggestions for this?

---

<div class="post-metadata">

**Author:** ![fregatte](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/f/c67d28/32.png) [@fregatte](https://forum.pritunl.com/u/fregatte)\
**Post date:** [April 2, 2025, 8:30am UTC](https://forum.pritunl.com/t/auth-pritunl-com-callback-azure-500-error/3171/7 "2025-04-02T08:30:54Z")

</div>

> I’ve found the place where the error is being emitted, tried calling the url in Postman and was getting a 500 error for the problematic user, and 200 for a user who is able to login.

Can you share a request example to test it from our side, please?

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [April 2, 2025, 9:08am UTC](https://forum.pritunl.com/t/auth-pritunl-com-callback-azure-500-error/3171/8 "2025-04-02T09:08:03Z")

</div>

What Azure Region and Azure API Version are set in the top right settings?

---

<div class="post-metadata">

**Author:** ![fregatte](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/f/c67d28/32.png) [@fregatte](https://forum.pritunl.com/u/fregatte)\
**Post date:** [April 2, 2025, 9:19am UTC](https://forum.pritunl.com/t/auth-pritunl-com-callback-azure-500-error/3171/9 "2025-04-02T09:19:03Z")

</div>

> What Azure Region and Azure API Version are set in the top right settings?

I cannot find “Azure Region” field in the settings. “Azure API Version” set in “Microsoft Graph”.

 ![image](https://forum-static.pritunl.com/original/2X/7/784112bd9e00488be84c6b3a2e8589db11bb3641.jpeg)

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [April 2, 2025, 9:54am UTC](https://forum.pritunl.com/t/auth-pritunl-com-callback-azure-500-error/3171/10 "2025-04-02T09:54:09Z")

</div>

Older versions don’t have the option. You can try updating to a newer version of Pritunl and switching to Global (OAuth v1) or Global (OAuth v1). The version you have is likely using the legacy Azure AD Graph. From what I can find this will be disabled in June 2025.

---

<div class="post-metadata">

**Author:** ![lmvdz](https://forum.pritunl.com/user_avatar/forum.pritunl.com/lmvdz/32/179_2.png) [@lmvdz](https://forum.pritunl.com/u/lmvdz)\
**Post date:** [April 2, 2025, 2:19pm UTC](https://forum.pritunl.com/t/auth-pritunl-com-callback-azure-500-error/3171/11 "2025-04-02T14:19:19Z")

</div>

You can reconstruct the request using the code: `https://auth.pritunl.com/update/azure/user=<email>&license=<license_key>&directory_id=<azure_tenant_id>&app_id=<azure_application_id>&app_secret=<azure_application_secret>`

for a user that is working you’ll get 200, for a problematic user 500

---

<div class="post-metadata">

**Author:** ![lmvdz](https://forum.pritunl.com/user_avatar/forum.pritunl.com/lmvdz/32/179_2.png) [@lmvdz](https://forum.pritunl.com/u/lmvdz)\
**Post date:** [April 2, 2025, 3:03pm UTC](https://forum.pritunl.com/t/auth-pritunl-com-callback-azure-500-error/3171/12 "2025-04-02T15:03:15Z")

</div>

what is the latest version?

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [April 2, 2025, 3:21pm UTC](https://forum.pritunl.com/t/auth-pritunl-com-callback-azure-500-error/3171/13 "2025-04-02T15:21:13Z")

</div>

The latest stable release is `v1.32.4181.41`.

---

<div class="post-metadata">

**Author:** ![lmvdz](https://forum.pritunl.com/user_avatar/forum.pritunl.com/lmvdz/32/179_2.png) [@lmvdz](https://forum.pritunl.com/u/lmvdz)\
**Post date:** [April 2, 2025, 3:28pm UTC](https://forum.pritunl.com/t/auth-pritunl-com-callback-azure-500-error/3171/14 "2025-04-02T15:28:21Z")

</div>

Yes, just making sure we were on the latest, we have that option you talked about, we switched to Global v1, Microsoft Graph was already selected, and now able to complete the flow e2e. We also switched off the sso\_bypass now.
