Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

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

share|improve this answer
add comment

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: http://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

share|improve this answer
    
Thanks vedran, i just came back here . i achieved user permission level with the help of RoleAssignmentCollection, RoleDefinitionCollection. –  palak bhansali Sep 20 '11 at 7:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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