Action is not authorized with current scopes; requires any of [users:activity]

Hi, team, I met an error on’ Action is not authorized with current scopes ’ could you please tell me how to fix?

This shouldn’t occur with a default JupyterHub installation, so it’s probably due to your configuration or deployment. Can you tell us which versions of JupyterHub and related components you’re using, how you deployed it, and show us your configuration?

For future reference have a look at

Hi, @manics , thanks for your reply, I have solved above exception
Actually, my jupyterhub is deployed in k8s, and when users login jupyterhub, jupyterhub will create a user pod for different user by execute this command

jupyterhub -f /opt/ppnotebooks/jupyterhub/

in, I used kubespawner.spawner to create user pod . now user pod is running , above issue has been resolved by adding env variables

spawner.environment[‘JUPYTERHUB_OAUTH_SCOPES’] = ‘[“access:servers!server=zozhang/”, “access:servers!user=zozhang”, "users:activity!zozhang]’

but I met a new issue I don’t know how to check, because althouth above issue had disappeared, and user pod is running , but when user pod tries to notify jhub, it seems be failed
this is the logs of jhub

and this is the logs of user pod

and when I login user pod by using

k exec -it jupyter-zozhang -n notebooks-qa bash

and try to request user pod

telnet 8888

I got this info

Malformed HTTP message from Malformed HTTP request line

so I’m suspecting whether this issue is because of some wrong configuration
this is the configuration of

c.JupyterHub.ip = ‘’
c.JupyterHub.port = 8000
c.JupyterHub.spawner_class = PPSpawner
c.JupyterHub.hub_ip = ‘’
c.JupyterHub.cleanup_servers = True
c.JupyterHub.proxy_auth_token = ‘**************’
c.KubeSpawner.start_timeout = 120
c.KubeSpawner.http_timeout = 60 * 10
c.KubeSpawner.allow_privilege_escalation = True
c.JupyterHub.base_url = ‘/notebooks’
c.JupyterHub.pid_file = ‘/opt/notebooks/jupyterhub/pid/’
c.Authenticator.admin_users = { ‘zozhang’}
c.JupyterHub.cleanup_proxy = True
c.JupyterHub.cleanup_servers = True
hub_connectIP = socket.gethostbyname(socket.gethostname())
c.JupyterHub.hub_connect_ip = hub_connectIP
c.KubeSpawner.service_account = ‘notebook’

and jupyterhub and jupyterhub-singleuser both on version 2.3.0

and there’s an exception in jhub when start user pod

Hi, team, do you need more info? I tried some solutions ,but all of them didn’t take work :joy: if you have time, could you please give some suggestions?

Hi, team and @manics this issue has been fixed, the reason of this exception is because I didn’t configure right Role for the serviceaccount, now I add a clusterAdmin for this serviceaccount, the this issue was fixed.