Hi,
We do not provide means to do authentication or retrieve scopes in the middle of an application.
Usually you retrieve the information at the startup of the application.
As an example, see the "ConsoleApp" in $FGLDIR/web_utilities/services/gip/src/console/ConsoleApp.4gl
The ConsoleApp displays different menu when you are an admin or a simple user.
If you need more details please contact your local support center.
Regards,
Sisa.