Quantcast
Channel: Authentication
Viewing all 8293 articles
Browse latest View live

Big jump in User ID

$
0
0
by Mick Smith.  

Hi Everyone,


Hopefully someone can help.

I've just noticed that on one of our Moodle installs, the user ID of new accounts has jumped to a much larger number.

Looking at the mdl_user, all id's are sequential from 0 up to 9537, then the next account created after that is 500243593.  And all accounts created after that are continuing from 500243593

We don't have any hacks to the core code.  Has anyone else experienced this issue before and able to offer assistance?

Moodle 3.8.4+

Many Thanks


Re: Big jump in User ID

$
0
0
by Mick Smith.  

A wee update for anyone thats able to help with this....
I think its down to a rogue csv that was uploaded by one of the admins back in March. Is there away to reset the automatic user ID moodle creates to a lower number?

Saml 2 sso authentication

$
0
0
by dev testing.  

I'm using moodle latest version with simplesamlphp for sso login.  We have another application (app2) which also uses same simplesamlphp for login. So when user logout from the "app2", single signout service triggered and sso also got logged out. This is working fine as expected. But moodle still keeps the session and didn't validate the current session with sso server for each request. 

My expectation is that when a user logout from other application should reflect in mooodle also. Is there a way to do this? Or do we need to develop a custom solution ?

Re: Big jump in User ID

$
0
0
by Leon Stringer.  

If this is the mdl_user.id column this isn't managed or incremented by Moodle, it's the database software which does this.

Whether and how this can be reset would depend on the database software, MySQL, MariaDB, PostgreSQL or SQLServer.

With MySQL 5.7 and earlier, the counter gets reset to the highest value present + 1 when MySQL is restarted. For example:

  1.     If you inserted 200 rows into a table the next id would be 201.
  2.     If you deleted the last 100 rows the next id would still be 201.

But:

  1.     If you inserted 200 rows into a table the next id would be 201.
  2.     If you deleted the last 100 rows and then restarted MySQL (assuming version 5.7).
  3.     Now the counter is reset and the next id would be 101.

So if you were using MySQL 5.7 or earlier and deleted the rows from mdl_user (not just deleting them from Moodle as this doesn't actually remove the rows) then restarting MySQL should reset the counter.

However in MySQL 8.0 and later (and MariaDB 10.2.4 and later), restarting doesn't reset this counter. MariaDB also has SET insert_id which may be useful.

I'm less familiar with PostgreSQL and SQL Server so I don't know about resetting these counters off the top of my head.

If you were looking to change these I'd recommend 1) making sure there was a database backup and 2) trying this on a test system first to make sure it works as expected.

Re: OIDC Error - "The existing token for this user does not contain a valid user ID"

$
0
0
by Francela Jiménez.  

did you fix this problem?

Office 365 intégration Admin consent does not work properly

$
0
0
by Christian Poirier.  

Hi,

When I click on the link https://myserver.mydomain.ca/local/o365/acp.php?mode=adminconsent



Moodle redirect to https://login.microsoftonline.com/{tenanid}/oauth2/v2.0/authorize?response_type=code&client_id={clientId}&scope=openid%20profile%20email&nonce=N5faeba45595a5&response_mode=form_post&resource=https%3A%2F%2Fgraph.microsoft.com&state=A1apl5Gwi1xHu5p&redirect_uri=https%3A%2F%2Fm2-test.teluq.ca%2Fauth%2Foidc%2F&prompt=admin_consent

I have the following error even if I am the Global administrator of my Azure portal.

AADSTS901002: The 'resource' request parameter is not supported.



Does any one knows what should I do to resolve it?

Thanks

Re: Big jump in User ID

$
0
0
by Mick Smith.  

Thanks for replying Leon, I tried ALTER TABLE mdl_user AUTO_INCREMENT = VALUE on a test database, but as you stated, MYSQL will still set the value as highest value present + 1. I'm not wanting to mess around with the current users id's, the high id's shouldnt cause any issue. I was just shocked when I noticed them in the first place. Thanks for your assistance!

self based email registration

$
0
0
by Argjend Bytyqi.  

Hello community,

I'm running into a issues with setting up my SMTP, for a basic test I was trying to run gmail smtp but it is not working any idea why I'm getting all those messages?


smtp.gmail.com

used my account and password.



get city field from oauth2 office365 azure AD

$
0
0
by Kenny Calvat.  

Hello world smile

We have configure a successfully SSO with oauth2 microsoft. Users are able to connect to the platform then moodle received email, firstname, lastname, avatar, mobilePhone and alternatename.

But we want to received another field from microsoft profile : city. After many tries, we never received the city field in moodle profile. We already edited the userinfo_endpoint :

https://graph.microsoft.com/v1.0/me?$select=userPrincipalName,displayName,surname,givenName,city,preferredLanguage,mobilePhone

and the userfieldmappings : city to city.
Does we have to modify the scope (user.read) ? Does we miss something in moodle ? How we can debug more easier oauth2 query ?

Thank you very much,

Best regards

error/Could not upgrade oauth token - Moodle 3.9

$
0
0
by NHG E-Learning.  

Dear guys,

I been using Moodle 3.9 and Ms. Oauth2 for students. I have around 18k users with MS. OAuth2

Everything been going fine until this weekend. When I loggin back this morning using my Office 365 account as usual and I got this error:

error/Could not upgrade oauth token

Could anyone please help me out. Thanks you !!

Re: error/Could not upgrade oauth token - Moodle 3.9

$
0
0
by Leon Stringer.  

The message in Moodle doesn't include enough information to help troubleshoot these kinds of errors. You can modify the file lib/oauthlib.php as follows changing lines 570-572 from:

        if ($this->info['http_code'] !== 200) {
            throw new moodle_exception('Could not upgrade oauth token');
        }

to:

        if ($this->info['http_code'] !== 200) {
            if ($this->error) {
                $error = $this->error;
            } else if ($this->info['http_code']) {
                $error = "HTTP status: {$this->info['http_code']}";
            }

            throw new moodle_exception('Could not upgrade token', 'core_error', '', $response, $error);
        }

Then enable debugging (Site administration ▸ Development ▸ Debugging, Debug messages: DEVELOPER and Display debug messages: Yes). Hopefully you will see more detail including the error the Microsoft OAuth 2 service is sending.

Re: SAML2 exception. Cannot retrieve metadata for iDP

Removing Required Profile Fields

$
0
0
by Jessica Rocheleau.  

I'm using the email self-registration option and interested in removing all profile fields besides username, password, and email.

Some of the fields I'm interested in removing are "required". How might I go about removing both required and non-required fields from this page?

Thanks.

Re: Excesive users from LDAP

$
0
0
by Pedro Gago.  

Anyone can advise here?

Re: Excesive users from LDAP

$
0
0
by Emma Richardson.  

You need to change the setting in ldap settings to either suspend or delete the users that are no longer being pulled from the OU. Now the bind_dn is not going to affect the number of users though unless the new bind user only has permissions to see certain users - you need to either change the context (location of ou where your users are) or create a filter to only pull members of a certain group.

Re: self based email registration

Re: Excesive users from LDAP

$
0
0
by Pedro Gago.  

Thanks Emma.
Let me explain a bit more to understand your answer:
- I had the correct users (example user1) with info attached like courses, activities, certificates, etc.
- Due to any change in LDAP binding, incorrect users (example user2) has been added to moodle. These users don't have any info in Moodle.
Nota: I have to investigate what is the difference in LDAP binding.
So, if I suspend or delete the users in order to change the context and obtain only correct users (in my case only user1), won't I lose the info of correct users? I don't want to lose this info. Can you confirm the steps you gave me?
Thanks

Re: get city field from oauth2 office365 azure AD

$
0
0
by Jelly Smith.  

Have you figured this out? I'm trying to get any fields beyond first/last/email and not having much success. I'm also using SDS to connect my SIS to Azure, and I'm wondering if that is part of the problem. Are you using SDS?

Re: get city field from oauth2 office365 azure AD

$
0
0
by Kenny Calvat.  

Hello,

For our case, the problem was a moodle bug that forgot a loop to get all matching field : https://tracker.moodle.org/browse/MDL-59115.
I don't know what you are calling SDS, I am sorry and AzureAD is managed by our client.

Best regards,

LDAP users missing surname

$
0
0
by David Archibald.  

Hi,

I'm importing users successfully via the LDAP plugin, and have configured Data Mapping to bring in Firstname (GivenName), Surname (Surname) and email address (UserPrincipalName).

GivenName and UPN come in fine but Surname is blank. If I manually add it and resync, it goes back to blank. Have confirmed the AD attribute name is correct and populated.

Anyone seen this or something similar? I'm not sure what else to check as it is all configured correctly and the bind user has sufficient permissions etc.

TIA


Viewing all 8293 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>