Add userid to within plugin

Is there a way to get the grafana user id from within a plugin?

What type of plugin are you building? Are you looking for a TypeScript or a Go solution?

Good question. I don’t know. Looking to modify an existing plugin. How can I tell?

Right now, I see my userid being discovered as the cookie ie.

You can get it from the User model

import { config } from '@grafana/runtime';

console.log(config.bootData.user);
1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.