public static bool IsAuthorizationDeniedException(Common.MSGraph.Version1_0.DirectoryObjects.Models.OdataErrorException oe) { if (oe.Response != null && oe.Response.StatusCode == HttpStatusCode.Forbidden && oe.Body.Error != null && oe.Body.Error.Code != null && string.Equals(oe.Body.Error.Code, AuthorizationDeniedException, StringComparison.OrdinalIgnoreCase)) { return(true); } return(false); }
public static bool IsNotFoundException(this Common.MSGraph.Version1_0.DirectoryObjects.Models.OdataErrorException oe) { if (oe.Response != null && oe.Response.StatusCode == HttpStatusCode.NotFound && oe.Body.Error != null && oe.Body.Error.Code != null && string.Equals(oe.Body.Error.Code, RequestResourceNotFound, StringComparison.OrdinalIgnoreCase)) { return(true); } return(false); }