microsoftgraph / aspnetcore-connect-sample

[ARCHIVED] This ASP.NET Core MVC sample shows how to connect to Microsoft Graph using delegated permissions and the Azure AD v2.0 (MSAL) endpoint.
MIT License
123 stars 96 forks source link

AADSTS70001: Application with identifier 'my client id' was not found in the directory 'my directory' #18

Closed marcoforce closed 6 years ago

marcoforce commented 6 years ago

What's the cause of this error? It seems the tenant ID points to production. I already manually set the tenant ID in application settings and via azure.

mark-szabo commented 6 years ago

You need to replace 'my client id' with the app id you got when registering your app on the Azure portal (v1/ADAL) or on https://apps.dev.microsoft.com (v2/MSAL).

marcoforce commented 6 years ago

I also replaced 'my client id' with the app id that I got when I register the app on our azure portal. Still the same error.

jthake commented 6 years ago

This sample is actually what the ASP.NET MVC quick start uses and injects a working app id and secret into it. I would recommend using this first and get that working https://developer.microsoft.com/en-us/graph/quick-start

This will eliminate any issues with the way you've registered your app.

marcoforce commented 6 years ago

It seems that I created a quick start solution for .net framework (when I select ASP.NET MVC) but what I need is .Net Core 2.0, are there any steps that I missed/need to take?

jthake commented 6 years ago

We currently do not have a quick start for.net core 2.0. We do have a sample that shows this though here https://github.com/microsoftgraph/aspnetcore-connect-sample . We have on our backlog to provide a quick start for dotnetcore though. no ETA as yet.

mark-szabo commented 6 years ago

I have an earlier version of this sample in the git tree using aspnetcore2.0 with ADAL. Will link as soon as I'm at a computer.

mark-szabo commented 6 years ago

So here is that earlier version of the sample using ADAL and aspnetcore2.0: https://github.com/microsoftgraph/aspnetcore-connect-sample/tree/6d2fcf63eefe4b61d769e4ce93050de736e0ab44 Please keep in mind that this is not a release, just an in-progress commit, so it is not guaranteed to work out-of-the-box.