Customizing username by which pod is spawned after authentication

Hi, i want to change name by which pod gets spawned. Using AzureAd for authentication.I am following - Zero to JupyterHub with Kubernetes — Zero to JupyterHub with Kubernetes documentation
Admin has configured AzureAD to return below parameters-

resp.firstName =;

resp.lastName=; =;

resp.userName =

Currently pod gets spawned using “firstName” + “lastName”. I want to change it to userName as it’s unique identifier in our organization. Is there a way to change this configuration.

It looks like the AzureAdOAuthenticator has a username_claim option:

If that doesn’t work you can subclass and override the authenticate() method to return a different username.

@manics Thank you, i will try this.