AzureAD / microsoft-identity-web

Helps creating protected web apps and web APIs with Microsoft identity platform and Azure AD B2C
MIT License
681 stars 211 forks source link

[Bug] in msidentity-app-sync.exe/Microsoft.Identity.Web.ProjectTemplates #1148

Closed tim-biasoft closed 3 years ago

tim-biasoft commented 3 years ago

Which version of Microsoft Identity Web are you using? msidentity-app-sync.exe 1.0.0 Microsoft.Identity.Web.ProjectTemplates 1.8.2 (also tried 1.9.1)

Where is the issue? msidentity-app-sync.exe / webapp2 template

Is this a new or an existing app? new

Repro

dotnet new webapi2 --auth SingleOrg
msidentity-app-sync.exe

Expected behavior App scaffolded and configured

Actual behavior Error encountered with sign-in. See error message for details: AADSTS90002: Tenant 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' not found. This may happen if there are no active subscriptions for the tenant. Check to make sure you have the correct tenant ID. Check with your subscription administrator.

Possible solution Remove Domain from appsettings.json before running msidentity-app-sync.exe

"Domain": "yourDomain", 
jmprieur commented 3 years ago

@tim-biasoft:

tim-biasoft commented 3 years ago

@jmprieur I was signed in with Visual Studio and Azure CLI. It worked straight away after I removed Domain from appsettings.json which kind of rules out any authentication issue. Running these two commands back to back:

dotnet new webapi2 --auth SingleOrg
msidentity-app-sync.exe

Should work, right?

jmprieur commented 3 years ago

@tim-biasoft thanks very much for the heads-up. I've proposed a PR for this scenario.

tim-biasoft commented 3 years ago

@jmprieur Glad I could help in some way, I think msidentity-app-sync and the templates are a very important and useful feature 👍

jmprieur commented 3 years ago

Still need testing (automatically closed by GitHub)

jennyf19 commented 3 years ago

Included in 1.9.2 release