c# 4.0 - How to tell if the logged in user has a security role? -


i trying find out if logged on user has security role. i've looked on google (couldn't find answer) , sdk examples (they seemed way complicated). so, if know name of security role , user id, how check see if user has role?

if browse folder structure of crm 2011 sdk (link: https://www.microsoft.com/en-us/download/details.aspx?id=24004) location find looking for:

.\sdk\samplecode\cs\businessdatamodel\usersandroles\doesuserbelongtorole.cs

it provides sample built c# console application. code work in asp.net long app pool user authorized access crm organization trying connect to.

hope helps


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -