CRM does not seem to provide any methods in the SDK to check if a user has System Administrator privilege’s.

One straightforward way to achieve this is to query for a roles associated with the user which has a title of ‘System Administrator’. However this approach has its limitations in a multi-language enabled tenant as the role title would have been defined in a different language, in which case querying for a role with the tile ‘System Administrator’ would not render any results.

Looks like there is a possible undocumented way to get around this limitation.

Every OOB CRM role seems to have a ‘Role Template’ associated.
So the ‘System Administrator’ role is associated with a role template with the id ‘627090FF-40A3-4053-8790-584EDC5BE201’.
This role template id is the same across all tenants and is set when the instance is provisioned.

This id can be used to query CRM and get the desired results.

Refer sample query below. If the below query returns any record we could safely assume that the user has ‘System Administrator’ privilege.

var roleQuery = new QueryExpression(“role”);
roleQuery.Criteria.AddCondition(“roletemplateid”, ConditionOperator.Equal, “627090FF-40A3-4053-8790-584EDC5BE201”);
var userRolesLink = roleQuery.AddLink(“systemuserroles”, “roleid”, “roleid”);
userRolesLink.LinkCriteria.AddCondition(“systemuserid”, ConditionOperator.Equal, [USER GUID]);