Hi, Ben.
Please be warned that custom scripts are not covered by free Community support. Yet, as Gluu is open source project, all source codes are available for you to study. [Here](https://github.com/GluuFederation/oxAuth/tree/master/Server/integrations) we have a great selection of ready authentication scripts you can read and configure in your instance to experiment with, what should be enough to get a basic understanding and find some code to reuse in your own script. You can check what classes they import and study their composition to learn what other interfaces they offer.
We can provide you some hints even in this case, but please be as specific as possible when asking. I can't say yet I'm completely understand your use case, could you give some example, perhaps? Couldn't get what "claims not set against a user" mean, for example.
I'll try to answer next part:
>I think If I can get hold of the sessionclient I can then get to the client and scopes requested which is a start.
Here is code example that should deliver you current user's session state:
```
context = Contexts.getEventContext()
session_attributes = context.get("sessionAttributes")
if session_attributes.containsKey("origin_headers):
origin_headers = session_attributes.get("origin_headers")
```
`session_atrributes` should look like this:
```
{"scope":"openid profile email user_name","response_type":"code id_token","origin_headers":"https://sp.gluu.org/shibboleth","nonce":"nonce","redirect_uri":"https://nest.gluu.org/idp/auth-code.jsp","remote_ip":"192.168.15.1","auth_step":"1","client_id":"@!6BED.0CBA.D569.AA67!0001!6E3D.B9BF!0008!082F.319E","acr":"internal"}
```
I guess that contains what your need: "requested scopes for the user"