I would like to use Microsoft Graph and this works:
await graphClient.Users["xxxxxxx-xxxx-xxx-xxxx-xxxxxxx"]
.Request()
.GetAsync();
And this throws the OrganizationFromTenantGuidNotFound error:
await graphClient.Users["xxxxxxx-xxxx-xxx-xxxx-xxxxxxx"]
.SendMail(message, false)
.Request()
.PostAsync()
I authenticate as an application with my client id, tenant id and secret.
I have set mail permissions in my app registration and the user is assigned.
Graph permissions with admin consent
I have tried to define the scope as "https://graph.microsoft.com/mail.send/.default" but then I get this error: MsalServiceException: AADSTS500011: The resource principal named https://graph.microsoft.com/mail.send was not found in the tenant...
I have also tried adding a new user to my app registration but that gives the same error.
My AAD account does have a Microsoft 365 Family subscription and I have an Azure trial account.
What else should I check? Thank you!