No permissions to create web service token for the service local_mobil

No permissions to create web service token for the service local_mobil

by Niklas Frost -
Number of replies: 3

Arbitrary login SSO in app working - not working -


Hi!  I can't get the SSO login for the mobile app to work properly.  Any advice would be highly appreciated!

Some of our users can use their App on their mobile phones to login. They get directed to the SSO web page at the University, logs in there, and then they are redirected to the app and..... all is fine.


However....some others users, instead, regardless of using iphone or Android, and regardless of using a new Moodle app or old gets not redirected after login. They are stuck at the browser Moodle.

They do get an error message displayed by Moodle in the browser on the phone - still in the  ordinary Moodle site.

It says: 

No permissions to create web service token for the service local_mobile


So what can I test?  The certificates are checked and seems to be correctly installed.

Best Regards, Niklas

Average of ratings: -
In reply to Niklas Frost

Re: No permissions to create web service token for the service local_mobil

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

It sounds like you haven't set the permissions for the local_mobile plugin correctly. Go to /admin/settings.php?section=local_mobile and click "Check plugin configuration", and see if you get any warnings.

In reply to Mark Johnson

Re: No permissions to create web service token for the service local_mobil

by Niklas Frost -

Thx! But I had checked that, and did so now again.

We have "Yes" on everything:

Step     Status     Description

1. Enable web services     Yes     Web services must be enabled in Advanced features.
2. Enable web services for mobile devices     Yes     Enable mobile service for the official Moodle app or other app requesting it. For more information, read the Moodle documentation
3. Enable the Moodle Mobile additional features service     Yes     This service must be enabled.
4. Grant permissions to the authenticated user role     Yes     Edit the Authenticated user role and allow the capability moodle/webservice:createtoken


Any other tips?! Best Regards, Niklas

In reply to Niklas Frost

Re: No permissions to create web service token for the service local_mobil

by Niklas Frost -

Hi! It is solved now. It was only I as an admin who could not login with the app. As a site admin I needed a token which we could give me thru the config page for tokens:

  Dashboard / ► Site administration / ► Plugins / ► Web services / ► Manage tokens

Nota bene:

We chose

Service  Moodle Mobile additional features service

Best Regards, Niklas