public void RemoveGroupMember(string username) { if (this is PBIAPIClient) // if the caller is a PBIClient, we do not have a ParentGroup but need to use "My Workspace" instead { throw new Exception("Cannot remove users from 'My Workspace'!"); } using (HttpWebResponse response = ParentPowerBIAPI.SendDELETERequest(ApiURL, PBIAPI.Users, username)) { string result = response.ResponseToString(); } }
public void Delete() { if (ParentPowerBIAPI == null) { throw new Exception("No PowerBI API Object was supplied!"); } using (HttpWebResponse response = ParentPowerBIAPI.SendDELETERequest(ApiURL)) { string result = response.ResponseToString(); } }