edgardmessias / glpi-singlesignon

GNU General Public License v3.0
68 stars 51 forks source link

GLPI User not authorized to connect to glpi #46

Open Ogrimcmoi opened 1 year ago

Ogrimcmoi commented 1 year ago

Hi everyone,

i try to connect the plugin with AZURE. But in the end i have the error " user not authorized to connect to glpi "

in the plugin i have put my url of glpi https://xxxx
But still the same error.

What i have do is wrong ?

Please help me i am blocked :)

Neozlag commented 1 year ago

Hi, The problem is in the provider.class.php, in the findUser() function. In the remote_id_fields[] array, we can see the function search in the fields "id" or "username" for the user. When we use Openid Connect with default configuration, the username is save in the "sub" field, so , in the array list, you need to add 'sub' field like that : $remote_id_fields = ['id', 'username', 'sub'];

seblezinzin commented 1 year ago

Hello, I checked findUser fucntion and it's good but I still get the same error : user not authorized to connect glpi

claugiral commented 1 year ago

Hello!

I´m facing the same problem, I change the array list adding the 'sub'field, but it doesnt solve the issue... I note that if the user is already created in glpi I can access... and although I mark in the singlesignon plugin the option "Add user in database=yes" its always shows as "NO" maybe its that the problem? this option have a problem? or I have done something wrong, any suggestion to fix it?

thanks!

wmeneses commented 1 year ago

Hello!

I´m facing the same problem, I change the array list adding the 'sub'field, but it doesnt solve the issue... I note that if the user is already created in glpi I can access... and although I mark in the singlesignon plugin the option "Add user in database=yes" its always shows as "NO" maybe its that the problem? this option have a problem? or I have done something wrong, any suggestion to fix it?

thanks!

Where is this option?

claugiral commented 1 year ago

The option "add user in database" is at the end of the configuration plugin "single sign on" page

seblezinzin commented 1 year ago

I don't have this option ....

muzzol commented 1 year ago

I'm facing the same problem and I don't have that option.

I just installed latest Master code, so I'm pretty sure I have the latest version.

nykroy commented 1 year ago

when the user have to reset his password, if the user havent got email license it cant access to GLPI after the password changed

titansmc commented 1 year ago

I have the latest version of the plugin and don't see any button, neither search through the code will give me any hint of this "Add user in database".....

Maikantoniolima commented 1 year ago

Was there a solution to the problem of adding users who log in and are not in the database?

leo-333 commented 1 year ago

i have the same problem that my authorized user via gitlab is not authorized to connect to glpi. Has somebody a solution for this?