public JsonResult GetSubscriptions(string CustomerAADId, int jtStartIndex = 0, int jtPageSize = 0, string jtSorting = null)
{
if (graphService.app_id != resellerService.crest_app_id || !graphService.initialized)
graphService.Initialize(resellerService.tenant_name, resellerService.crest_app_id, resellerService.crest_app_key);
if (!crestService.initialized)
crestService.Initialize(graphService.oauth_token.token, resellerService.crest_account_id);
Customer c = crestService.GetCustomer(CustomerAADId);
List<Subscription> subscriptions = crestService.GetSubscriptionsByCustomer(c.id).OrderBy(x => x.friendly_name).ToList();
return Json(new { Result = "OK", Records = subscriptions, TotalRecordCount = subscriptions.Count });
}