I have a couple of questions about implementing identityManager in JSAPI 4.x and possible ways to present users with the relevant server resources for which they are authorized to
1) I am creating a token based authentication to access ArcGIS server-hosted resources using ArcGIS JSAPI 4.x identityManger. Is there a way possible so I can get a list hosted services on ArcGIS server that are accessable through that particular token.
2) Right now after registering a token when I try to access a secure service for which that user is not authorized to access is just throwing following the error
Is there a way possible to catch this error and present user with another secure hosted service for which user is authorized to.
I will appreciate your response.