Return ApplicationGroup Roles.

Topics: NetSqlAzMan Core
Feb 22, 2011 at 1:17 PM


First of all i have to say thanks for your good support and your fantastic library.

How can i Get All Roles of an applicationGroup ?

i am using this code to get all Roles that belongs to an user.


Dim sc As NetSqlAzMan.Cache.StorageCache

            Dim authorizedItems As AuthorizedItem() = sc.GetAuthorizedItems(StoreName, ApplicationName, Storage.GetDBUser(UserName).CustomSid.StringValue, DateTime.Now)
            authorizedItems = (From t In authorizedItems Where t.Authorization = AuthorizationType.Deny OrElse t.Authorization = AuthorizationType.Neutral).ToArray()

Regards shaahin.


Feb 23, 2011 at 9:31 AM


to get all User Roles you must invoke a CheckAccess for each Role and get only results that are Allow or AllowWithDelegation.

To get all Roles of an ApplicationGroup you have to get before all the application group members and for each member invoke a CheckAccess; then consider only results that are Allow or AllowWithDelegation.



Andrea Ferendeles
NetSqlAzMan Project Coordinator
E-mail Web

Feb 23, 2011 at 9:41 AM

Thank You.

isn't any way to get them from StorageCache?

For Less Db Calls.

Feb 23, 2011 at 9:46 AM


StorageCache is just a “Read-only” cache … and to read “check-access” results quickly.