Microsoft Azure provides a super-easy way to create an app that includes an authentication feature for the Azure Active Directory account.
There are only three steps, the first step is creating the Azure Active Directory application, the next step is to download code from the Quickstart section, then the last step is executing app from Visual studio. It is no coding but is the operation of Visual Studio.
This super-easy way is described in this article.
・Create Azure Active Directory application
The previous article described an overview of the authentication feature provided by Microsoft Graph API. And it authorizes the Azure Active Directory account as four types of grant flow of OAuth 2.0. The article also described the ‘authorization code’ grant type of authentication as the basic type. Amid described it, also how to create the Azure Active Directory application was described. So please refer to the article.
The article described using ‘OAuth 2.0 <debugger/>’ instead of a client app. This article describes how to download a client app from the Azure portal and confirm the execution of its authentication flow.
・Download the code of an app
When going to the Azure portal and select [Azure Active Directory] – [App registrations] – target application select, it shows [Overview] section, so in case of select [Quickstart] section, it shows [Download the code sample] button. Press [Make this change for me] button of [Step 1] section.
It configures an app to use a redirect URL for the local development environment with the port number of IIS Express.
・Visual Studio common pattern to open the file created under other environments.
Steps below do show this code sample but these steps are common steps that have to do for opening the file created under other environments.
If the download is done and extracts it then right-click at the file of the extracted folder and select [Properties] item of the context menu for unlocking file protection.
It unlocked, open [sln] file with Visual Studio.
Amid file open with Visual Studio, Visual Studio show the confirmation to restart under a different credential if the code asserts more permission needs ‘run as administrator’.
And also shows confirmation to open the project because the code is not created in a fully trusted environment for the PC.
When the solution(or project) that is not created with the PC opens for the first time, it is good to do that ‘Restore NuGet Packages’ which it is necessary or not.
As of press a list item of [Start Debugging] box([IIS Express] selected), the app shows login confirmation with an explanation that the app access to user resources. After the second time, the app shows the Account ID input dialog, the app continues the Password input dialog.
Trancesion to Home of app when login process complete.
No responses yet