0

I'm looking for ways to manage and monitor groups and activities that are happening during the meets in MS Teams. So I thought this might get me started: https://github.com/microsoftgraph/aspnet-snippets-sample

I did everything according to the guide, howewer when I try to login with my work account, it outputs this error:

fail: Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler[17]
      Exception occurred while processing message.
Status Code: NotFound
Microsoft.Graph.ServiceException: Code: ResourceNotFound
Message: Resource could not be discovered.
Inner error:
    AdditionalData:
    date: 2020-11-28T14:54:07
    request-id: /*not sure you should see this*/
    client-request-id: /*not sure you should see this*/
ClientRequestId: /*not sure you should see this*/


   at Microsoft.Graph.HttpProvider.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
   at Microsoft.Graph.BaseRequest.SendRequestAsync(Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)
   at Microsoft.Graph.BaseRequest.SendAsync[T](Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)
   at Microsoft.Graph.UserRequest.GetAsync(CancellationToken cancellationToken)
   at SnippetsApp.Startup.<>c__DisplayClass4_0.<<ConfigureServices>b__3>d.MoveNext() in C:\Users\master\Documents\aspnet-snippets-sample-master\SnippetsApp\Startup.cs:line 62
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.Identity.Web.WebAppServiceCollectionExtensions.<>c__DisplayClass4_1.<<AddWebAppCallsProtectedWebApi>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.RunAuthorizationCodeReceivedEventAsync(OpenIdConnectMessage authorizationResponse, ClaimsPrincipal user, AuthenticationProperties properties, JwtSecurityToken jwt)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()

It appears that this error usually happens when trying to use mail services when user has no mailbox created. Did I miss something?

Edit: My user type in Azure Active Directory is member.

0scr_
  • 3
  • 3

1 Answers1

0

This issue has explained this error. You need to login with a Microsoft account(personal or work/school), not an invited account.

When sending an email as a user, the user needs to have a mailbox associated with them.

Users without a license that includes Exchange Online, as well as external users (e.g. invited users) will generally not have a mailbox in the tenant, and thus would be unable to send emails.

unknown
  • 6,778
  • 1
  • 5
  • 14
  • Well, how to determine if I have a Microsoft account or not? I am able to log in with it to our Exhange server through Outlook, as well as many other Microsoft services, such as admin panels, etc. How is this not a Microsoft account? – 0scr_ Nov 30 '20 at 13:31
  • The user type of invited account is `guest`, you could find them in `Azure Activity Directory` -> `Users` in the portal. – unknown Dec 01 '20 at 01:51
  • Just checked, my user type is member, added to the main question. Tried to login again, same error. – 0scr_ Dec 01 '20 at 10:21