I have AzureAD Accounts with trying to hit https://graph.microsoft.com/v1.0.
I'm using the example ubiquitous:
{
// Get user photo
using var photoStream = await graphClient.Me.Photo.Content.Request().GetAsync();
byte[] photoByte = ((MemoryStream)photoStream).ToArray();
ViewData["Photo"] = Convert.ToBase64String(photoByte);
HttpContext.Session.SetString("PhString", ViewData["Photo"].ToString());
}
catch (System.Exception)
{
ViewData["Photo"] = null;
}
}
I get the system exception everytime. In Graph Explorer, after login in as the AD User. Calls recieve:
{
"error": {
"code": "OrganizationFromTenantGuidNotFound",
"message": "The tenant for tenant guid '734a0293-a586-44fa-b728-43b06ef11410' does not exist.",
"innerError": {
"request-id": "6864e68b-6eec-4aed-a14e-c29fdac626fc",
"date": "2020-06-03T17:18:40"
}
}
}