Use clientMetadata in a custom connection

I was wondering if there is a way to get the clientMetadata (like for the rules , in their context.clientMetadata ) inside a custom connection with my own database, the goal is to identify the application the user tried to log in and display a message when it is a application he doesn’t have access.
I can use the rules for this because I use ULP so I can’t flash an error message if the user is already “authenticated” .

Hey there!

Sorry for such huge delay in response! We’re doing our best in providing you with best developer support experience out there, but sometimes our bandwidth is not enough comparing to the number of incoming questions.

Wanted to reach out to know if you still require further assistance?