You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2021-09-21 13:30:17

faycalO
Member
Registered: 2021-09-08
Posts: 3

Problem adding Oauth authorization with Azure AD

Hello Dear,

I am in the process of configuring GLPI authentication with Azure AD via the OAuth 2 plugin.
Azure AD is well linked to GLPi, OAuth2 configurations are also OK (client Id, client secret, callback, tenant id).
The problem is in the configuration of authorizations on Oauth. When I want to create a new authorization, I am redirected to Azure AD asking me to authenticate (email, password). Except that just after, instead of creating the authorization, I get an error on the GLPI side: Unable to save the authorization code.

and in the log here is what I find:
glpiphplog.WARNING: *** PHP User Warning (512): Unable to get user email in \ opt \ glpi \ plugins \ oauthimap \ inc \ authorization.class.php at line 222
  Backtrace:
plugins / oauthimap / inc / authorization.class.php: 222 trigger_error ()
... s / oauthimap / front / authorization.callback.php: 50 PluginOauthimapAuthorization-> createFromCode ()

So impossible to finish configuring the plugin ...
Do you have a clue for me to correct this? or set it correctly?
For info: Ubuntu for OS and GLPI 9.5.3, Oauth IMAP plugin

HELP .. Thank you

Last edited by faycalO (2021-09-21 17:11:44)

Offline

#2 2021-09-27 20:32:34

faycalO
Member
Registered: 2021-09-08
Posts: 3

Re: Problem adding Oauth authorization with Azure AD

Please Help

Offline

#3 2021-11-23 10:24:18

miudon
Member
Registered: 2016-06-08
Posts: 22

Re: Problem adding Oauth authorization with Azure AD

Hi,
I have the exact same error, did you solve your problem?
Thanks in advance

Offline

#4 2022-05-13 20:24:08

nobreesley
Member
Registered: 2022-05-13
Posts: 4

Re: Problem adding Oauth authorization with Azure AD

faycalO wrote:

Hello Dear,

I am in the process of configuring GLPI authentication with Azure AD via the OAuth 2 plugin.
Azure AD is well linked to GLPi, OAuth2 configurations are also OK (client Id, client secret, callback, tenant id).
The problem is in the configuration of authorizations on Oauth. When I want to create a new authorization, I am redirected to Azure AD asking me to authenticate (email, password). Except that just after, instead of creating the authorization, I get an error on the GLPI side: Unable to save the authorization code.

and in the log here is what I find:
glpiphplog.WARNING: *** PHP User Warning (512): Unable to get user email in \ opt \ glpi \ plugins \ oauthimap \ inc \ authorization.class.php at line 222
  Backtrace:
plugins / oauthimap / inc / authorization.class.php: 222 trigger_error ()
... s / oauthimap / front / authorization.callback.php: 50 PluginOauthimapAuthorization-> createFromCode ()

So impossible to finish configuring the plugin ...
Do you have a clue for me to correct this? or set it correctly?
For info: Ubuntu for OS and GLPI 9.5.3, Oauth IMAP plugin

HELP .. Thank you




In GLPI when configuring the plugin (Oauth IMAP application) put the (customer value) that is informed in the Microsoft365 portal in the GLPI (customer secret) field, so you will be able to add authorization without worries.

We are available.

Offline

#5 2022-06-29 23:44:12

mauricioasj
Member
Registered: 2022-06-29
Posts: 1

Re: Problem adding Oauth authorization with Azure AD

I'm having the same problem when using the plugin Oauth IMAP.

I have already entered Tenant ID, Client ID, Client Secret.

I also tried to enter the Client ID in Secret but the message below is still displayed.

Unable to save authorization code

Did you have any progress on this personal issue?

I would like our users to authenticate using Office 365 accounts

Last edited by mauricioasj (2022-06-29 23:45:13)

Offline

#6 2022-07-01 20:16:32

tigpibr
Member
Registered: 2022-07-01
Posts: 1

Re: Problem adding Oauth authorization with Azure AD

I solved this error changing the way the authentication of the application was registered at Azure AD.
Choose Web and paste the Redirect URL, given by GLPI Oauth plugin.

Offline

#7 2022-10-07 07:40:56

mshettha
Member
Registered: 2022-10-06
Posts: 2

Re: Problem adding Oauth authorization with Azure AD

I'm a newbie and also have that similar issue but just have solved by myself. I'd recommend you to see the 'php-errors.log' file under '/var/www/glpi/files/_log' first. Then you would get a clue of which error might came from. Mostly my error cause from application registration settings on Azure side.

Offline

#8 2022-10-13 18:50:26

coolcrash
Member
Registered: 2020-10-23
Posts: 3

Re: Problem adding Oauth authorization with Azure AD

Tenant ID
Client ID
Client Secret

Everything perfect on the Azure side, this is simple as driving a bike, but after all , on the glpi side we always get the same bug error " Unable to save authorization code"

Offline

#9 2022-10-22 02:56:13

tlombardini
Member
Registered: 2010-06-17
Posts: 29

Re: Problem adding Oauth authorization with Azure AD

Hi, I have problems to use SMTP. I have installed the plugin Oauth for pop and IMap, but how to apply that to smtp too? Any idea?
Thank you!

Offline

#10 2024-04-27 04:07:21

victorjah50
Member
Registered: 2024-04-25
Posts: 3

Re: Problem adding Oauth authorization with Azure AD

I had the same issue, the client secret is really the secret value from app registration secret, now the authorization code was saved.

Offline

Board footer

Powered by FluxBB