2

I am trying to get the name of SharePoint group based on PrincipalID, But finding no luck with below code.

Can anyone help me in getting with below concern.

XmlDocument xmlEventData = new XmlDocument();
xmlEventData.LoadXml(string.Format("<EventData>{0}</EventData>", en.EventData));

var principalId = xmlEventData.DocumentElement.SelectSingleNode("/EventData/principalId").InnerText;
if(principalId!=null)
{
    var group = web.Groups.GetByID((int.Parse(principalId)));
}

string operation = xmlEventData.DocumentElement.SelectSingleNode("/EventData/operation").InnerText;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.