Znuny 7.1 OAuth2 The redirect URI

Moderator: crythias

Locked
goro95
Znuny newbie
Posts: 4
Joined: 03 Nov 2024, 15:29
Znuny Version: 7.1
Real Name: Gor

Znuny 7.1 OAuth2 The redirect URI

Post by goro95 »

Hello all,

I'm hosting Znuny 7.1 through my Raspberry PI 4. I'm trying to connect OAuth2 but I'm failling.

Check attachment, you can see that I configured the redirect URI in Azure correctly. When trying to refresh the token on Znuny I got the next attachment as reply.

Last attachment: you can see that the redirect URI is the same as Azure.

It's already changed to HTTPS, FQDN is also done and ScriptAlias also ok.

Any tips?

Thanks in advance!
You do not have the required permissions to view the files attached to this post.
root
Administrator
Posts: 4232
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Znuny 7.1 OAuth2 The redirect URI

Post by root »

Hi,

The screenshot you showed with OAuth2::AuthProviders is not valid. This setting has nothing to do with Znuny's OAuth2 implementation.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
goro95
Znuny newbie
Posts: 4
Joined: 03 Nov 2024, 15:29
Znuny Version: 7.1
Real Name: Gor

Re: Znuny 7.1 OAuth2 The redirect URI

Post by goro95 »

Hi Roy,

Thanks for your fast answer. I deleted it and saved my config. But the reply I get from Microsoft when I try to request a token with the missmatch is something in Znuny, no?

Redirect URI on Azure:

https://www.znuny.armit.be/znuny/get-oa ... on-code.pl

Redirect URI missmatch:

https://www.znuny.armit.be/[b]znunyget[/b]-oauth2-token-by-authorization-code.pl

Where can I change this?

Thanks in advance!
root
Administrator
Posts: 4232
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Znuny 7.1 OAuth2 The redirect URI

Post by root »

Hi,

The system configuration ScriptAlias should end with a /, the default value for your version is znuny/
Does this is the current value?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
goro95
Znuny newbie
Posts: 4
Joined: 03 Nov 2024, 15:29
Znuny Version: 7.1
Real Name: Gor

Re: Znuny 7.1 OAuth2 The redirect URI

Post by goro95 »

Hi Roy,

Thanks! Didn't see that. Now the link is ok. But the link https://www.znuny.armit.be/znuny/get-oa ... on-code.pl? is now redirecting to my Znuny login page?

Kind regards
root
Administrator
Posts: 4232
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Znuny 7.1 OAuth2 The redirect URI

Post by root »

Hi,

This only happens if the system does not recognize that you're already logged in (you are, right?) Check if all session-related settings in the system configuration are set to their default.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
goro95
Znuny newbie
Posts: 4
Joined: 03 Nov 2024, 15:29
Znuny Version: 7.1
Real Name: Gor

Re: Znuny 7.1 OAuth2 The redirect URI

Post by goro95 »

Hi Roy,

My bad, cookies.. Tried it with an incognito browser and it worked. Thanks for your time & help!

Kind regards
Locked