Get Grafana authentication information for external apps or services

Hi everyone.
I currently have a dashboard that contains some URLs that provide access to resources on a server (some of them even modify tables in a database).
The requests are made to a rest service which is in the same server of the dashboard.

To prevent someone to easily access those resources, each URL contains some IDs that cannot be easily guessed.

I would like to know if it’s possible to use the grafana authentication (after the user logs in to the dashboard) to know whether the user can access those resources or not on the other external service.
The idea would be that only the users logged in to the dashboard can access the resource on the rest service. So the rest service would somehow need to know from grafana if the user is logged in or not.

Is this possible?

I must specify that the rest service and the grafana instance are in the same machine and can communicate with each other.
Any ideas?

You need Grafana cookie.
Idea: use both services on the same domain, play with cookie samesite config. If you are good hacker (you understand underlying technology), then it may work. It will be hackish work around, probably you will sacrifice some security, but it may work.