0

I need to get roles for current user(like visitors,contributors,administrators etc.) from sharepoint 2010. I am using Silverlight client object model to deal with sharepoint 2010 API.

Kindly share your knowledge.

thanks & regards

2 Answers 2

2

Here is a sample code to get the groups in Silverlight app by calling the GetGroupCollectionFromUserAsync method of UserGroup.asmx web service.

http://www.innovawiz.com/get-the-sharepoint-groups-a-user-is-part-of-using-sharepoint-object-model

1

Why don't you explore possibilities of SharePoint Web services? I think you can reach your goal much easier by using web services then by using Client Object Model.

Take a look at UserGroup Web Service and its method UserGroup.GetRoleCollectionFromUser Method. I believe this method to be exactly what are you looking for.

Here you can find one example: https://stackoverflow.com/questions/1213459/determining-users-role-in-a-sharepoint-site-workspace-using-the-webservices-api

And here is explanation how to consume SharePoint Web Services from Silverlight: http://blogs.msdn.com/b/kaevans/archive/2009/04/28/sharepoint-for-developers-part-4-consuming-sharepoint-web-services-from-silverlight.aspx

1
  • Thanks vedran, i just came back here . i achieved user permission level with the help of RoleAssignmentCollection, RoleDefinitionCollection. Commented Sep 20, 2011 at 7:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.