All Projects → juunas11 → aspnetcore2aadauth

juunas11 / aspnetcore2aadauth

Licence: other
ASP.NET Core 2.0 Azure AD authentication example

Programming Languages

C#
18002 projects
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to aspnetcore2aadauth

Joonasw.ManagedIdentityDemos
Example uses of Azure Managed Identities
Stars: ✭ 24 (-35.14%)
Mutual labels:  asp-net-core, azure-active-directory
Car-Rental-Project
A car rental project developed with ASP.Net Core & Angular.
Stars: ✭ 90 (+143.24%)
Mutual labels:  asp-net-core
eShopOnWeb
Sample ASP.NET Core 6.0 reference application, powered by Microsoft, demonstrating a layered application architecture with monolithic deployment model. Download the eBook PDF from docs folder.
Stars: ✭ 8,250 (+22197.3%)
Mutual labels:  asp-net-core
grandnode2
Free, Open source, Fast, Headless, Multi-tenant eCommerce platform built with .NET Core, MongoDB, AWS DocumentDB, Azure CosmosDB, LiteDB, Vue.js.
Stars: ✭ 626 (+1591.89%)
Mutual labels:  asp-net-core
SPA-With-Blazor
Creating a Single Page Application with Razor pages in Blazor using Entity Framework Core database first approach.
Stars: ✭ 27 (-27.03%)
Mutual labels:  asp-net-core
planningpoker4azure
Planning Poker 4 Azure
Stars: ✭ 49 (+32.43%)
Mutual labels:  asp-net-core
Blazor-CRUD-With-CloudFirestore
Single Page Application (SPA) using Blazor with the help of Google Cloud Firestore as Database provider
Stars: ✭ 34 (-8.11%)
Mutual labels:  asp-net-core
Blog.Core
Simple ASP.NET Core static blog engine
Stars: ✭ 15 (-59.46%)
Mutual labels:  asp-net-core
DNTCaptcha.Core
DNTCaptcha.Core is a captcha generator and validator for ASP.NET Core applications
Stars: ✭ 181 (+389.19%)
Mutual labels:  asp-net-core
LocalTransactionTableTest
利用rabbitmq做消息队列,通过本地消息事务表序列化消息,通过定时轮训保证消息强行落地,最终达到数据最终一致性
Stars: ✭ 19 (-48.65%)
Mutual labels:  asp-net-core
adminlte-aspnetcore2-version
Asp.Net Example version of famous and beautiful AdminLTE control panel themes and template.
Stars: ✭ 64 (+72.97%)
Mutual labels:  asp-net-core
OnlineUsers-Counter-AspNetCore
Display online users count in ASP.NET Core in two ways (Cookie - SingalR)
Stars: ✭ 29 (-21.62%)
Mutual labels:  asp-net-core
active-directory-b2c-javascript-hellojs-singlepageapp
A single page app, implemented with an ASP.NET Web API backend, that signs up & signs in users using Azure AD B2C and calls the web API using OAuth 2.0 access tokens.
Stars: ✭ 63 (+70.27%)
Mutual labels:  azure-active-directory
Lib.AspNetCore.WebSocketsCompression
[Archived] Lib.AspNetCore.WebSocketsCompression is a library which provides a managed implementation of the WebSocket protocol, along with server integration components and support for permessage-deflate compression.
Stars: ✭ 23 (-37.84%)
Mutual labels:  asp-net-core
GPONMonitor
GPON Monitoring tool for Dasan Networks GPON OLTs
Stars: ✭ 26 (-29.73%)
Mutual labels:  asp-net-core
clean-architecture-azure-cosmos-db
A starting point to build a web API to work with Azure Cosmos DB using .NET 5 and Azure Cosmos DB .NET SDK V3, based on Clean Architecture and repository design pattern. Partition key is also implemented through the repository pattern.
Stars: ✭ 277 (+648.65%)
Mutual labels:  asp-net-core
MvcSimplePager
Simple,lightweight,easy to expand pager for asp.net mvc and asp.net core,针对asp.net mvc 和 asp.net core 设计的通用、扩展性良好的轻量级分页扩展
Stars: ✭ 13 (-64.86%)
Mutual labels:  asp-net-core
csharp
📚 Recursos para aprender C#
Stars: ✭ 37 (+0%)
Mutual labels:  asp-net-core
Configuration.Provider.Docker.Secrets
.NET Core configuration provider for Docker Secrets.
Stars: ✭ 20 (-45.95%)
Mutual labels:  asp-net-core
CodeIndex
A Code Index Searching Tools Based On Lucene.Net
Stars: ✭ 28 (-24.32%)
Mutual labels:  asp-net-core

ASP.NET Core 2.1 Azure AD authentication example

This sample application is built on ASP.NET Core 2.1 to test authentication via Azure AD.

Pre-requisites

You will need a development environment capable of running an ASP.NET Core 2.1 application.

Windows users can install Visual Studio 2017 with the ASP.NET and web development workload.

Users on Windows, Mac, or Linux can download the .NET Core SDK and use any editor that works best. Visual Studio Code is pretty good.

Setup instructions

To run the app locally, you'll need to register an application in Azure AD.

How to register the app:

  1. Go to https://portal.azure.com
  2. Find Azure Active Directory on the left or from under All services
  3. Go to App registrations
  4. Click on New application registration
  5. Give the app a name, e.g. ASP.NET Core 2 Azure AD Test
  6. Make sure the application type is Web app/API
  7. Set sign-on URL to http://localhost:5000/Account/SignIn
  8. Click Create

Getting client id, setting reply URL, and generating client secret:

  1. After creation, open the app
  2. Copy the Application ID, and put it somewhere, this is also called the Client ID
  3. Click Settings and then Reply URLs
  4. Add https://localhost:5000/signin-oidc to the list and save it
  5. Go to Keys
  6. In the Passwords section, put some description for the key, select the expiry, and hit Save
  7. Copy the key value somewhere, this is your client secret (keep it secret)

Adding permissions for Microsoft Graph API:

  1. Find your app in the Azure AD blade's App Registrations tab in Azure Portal
  2. Go to Required permissions
  3. Click Add
  4. Choose Microsoft Graph as the API
  5. Select Sign in and read user profile, View users' basic profile, and View users' email address under Delegated permissions
  6. Click Select and Done

Getting the authority URL:

  1. Go back to the App registrations list
  2. Click Endpoints
  3. Copy the OAuth 2.0 Authorization Endpoint value
  4. Remove the /oauth2/authorize part from the URL, the result is your Authority

Fill the values in settings:

  1. Open the solution in Visual Studio
  2. Set client id and authority in appsettings.json
  3. Right-click on the project and click Manage user secrets
  4. Add the client secret here. Example below:
{
    "Authentication":{
        "ClientSecret": "your-client-secret....."
    }
}

The main reason to put the client secret there is to make sure it is not accidentally put into version control. This is not absolute advice and you must make the decision how to store configurations for your app.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].