Why does creating asp core web api with work account authentication create two app registrations in Azure AD?

Matt Pugsley 6 Reputation points
2021-01-21T00:48:54.657+00:00

Starting from Create a New Project in Visual Studio 2019 Professional:
Choose ASP.NET Core Web Application
Give it a name
Choose .NET Core and ASP.NET Core 5.0 in drop down boxes at the top
Choose ASP.NET Core Web API from template list
Click link "Change" under Authentication section
Choose "Work or School accounts" for authentication
Choose "Cloud - Single Organization".
Choose my company's domain
Do not check box for "Read directory data"
Click OK to conclude configuring authentication
Checkbox for "Configure HTTPS" is checked and grayed out
Leave "Enable Docker Support" checkbox clear
Leave "Enable OpenAPI Support" checkbox checked
Click "Create" button

I then get an app.
I then get two registrations of the app in Azure AD, each with their own client id.

Why do I get two registrations?

58845-two-registrations.jpg

Windows 10
Microsoft Visual Studio Professional 2019
Version 16.8.4

Thank you,
Matt Pugsley

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,669 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Dylan Zhu-MSFT 6,406 Reputation points
    2021-01-21T05:53:08.53+00:00

    Hi MattPugsley,

    You can enable "Overwrite the application entry if one with same ID exists", to solve this issue.
    58906-image.png

    And we suggest you report it to developer community.

    Best Regards, Dylan

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our * *documentation* to enable e-mail notifications if you want to receive the related email notification for this thread.**

    0 comments No comments

  2. Matt Pugsley 6 Reputation points
    2021-01-21T13:05:01.767+00:00

    Thank you for the reply, but this is not a situation of having an existing app and then I accidentally create a second registration instead of re-using the existing one. This is a new project, and the first time I go through the project creation steps, I get two registrations.

    I tried to report to the developer community. I got the message "A running instance of Visual Studio is required in order to report feedback for Visual Studio. Please close this window and reopen from a running instance of Visual Studio." However, I am running Visual Studio.