Managed Apple Id and Assigned Roles

I have an education app and would like to use the Managed Apple ID for users to gain access to the app and cloud kit data. I can see how to get the CKRecordID and hence some info about the current user. Is it possible to find the users assigned role from their CKRecordID and hence restrict the access to the data based on their assigned role?

interested in this as well.

Managed Apple Id and Assigned Roles
 
 
Q