How Can I Check the Security Role of a User using a SilverLight Application in CRM RRS feed

  • Question

  • Hi all,

    I am developing against a Silverlight Application that was customized for our CRM. I need to grab the current user's role in order to decide what he or she can see within a drop down.

    All my readings suggested that I use the Microsoft.Xrm.Sdk. However, when I try to add that reference to my Silverlight project, I get this message:

    You can't add a reference to Microsoft.Xrm.Sdk.dll as it was not built against the Silverlight runtime. Silverlight projects will only work with Silverlight assemblies.

    Has anyone pulled the user role within a silverlight application before?



    Monday, May 11, 2015 10:33 PM

All replies

  • When developing with Silverlight, you need to set a Service Reference to the Crm web services, rather than use the Microsoft.Xrm.Sdk assembly. Oddly, the best documentation for this is in the Crm 2011 SDK (https://msdn.microsoft.com/en-us/library/gg594452(v=crm.5).aspx ), though this still applies for Crm 2013 and 2015

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Tuesday, May 12, 2015 7:26 AM