Skip to content

Jmprieur/folder renaming #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
55 changes: 39 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,42 @@
/Microsoft.Identity.Web/.vs
/Microsoft.Identity.Web/bin
/Microsoft.Identity.Web/obj
/1. WebApp signs-in users with Azure AD (OIDC)/1.3. WebApp signs-in work and school or personal accounts/.vs
/1. WebApp signs-in users with Azure AD (OIDC)/1.3. WebApp signs-in work and school or personal accounts/bin
/1. WebApp signs-in users with Azure AD (OIDC)/1.3. WebApp signs-in work and school or personal accounts/obj
/1. WebApp signs-in users with Microsoft Identity (OIDC)/1.1. in my org/.vs
/1. WebApp signs-in users with Microsoft Identity (OIDC)/1.1. in my org/obj
/1. WebApp signs-in users with Microsoft Identity (OIDC)/1.1. in my org/bin
/2. WebApp calls Microsoft Graph on behalf of signed-in user/2.1. using authorization code flow/.vs
/2. WebApp calls Microsoft Graph on behalf of signed-in user/2.1. using authorization code flow/obj
/2. WebApp calls Microsoft Graph on behalf of signed-in user/2.1. using authorization code flow/bin
/3. WebApp calls several APIS (incremental consent and CA)/.vs
/3. WebApp calls several APIS (incremental consent and CA)/bin
/3. WebApp calls several APIS (incremental consent and CA)/obj
/1. WebApp signs-in users with Microsoft Identity (OIDC)/1.3. with work and school or personal accounts/.vs
/1. WebApp signs-in users with Microsoft Identity (OIDC)/1.3. with work and school or personal accounts/obj
/2. WebApp calls Microsoft Graph on behalf of signed-in user/2.2/.vs
/2. WebApp calls Microsoft Graph on behalf of signed-in user/2.1. using authorization code flow/AppCreationScripts/Steps.md
/1-WebApp-OIDC/1-1-MyOrg/.vs
/1-WebApp-OIDC/1-1-MyOrg/bin
/1-WebApp-OIDC/1-1-MyOrg/obj
/1-WebApp-OIDC/1-2-AnyOrg/.vs
/1-WebApp-OIDC/1-2-AnyOrg/bin
/1-WebApp-OIDC/1-2-AnyOrg/obj
/1-WebApp-OIDC/1-3-AnyOrgOrPersonal/.vs
/1-WebApp-OIDC/1-3-AnyOrgOrPersonal/bin
/1-WebApp-OIDC/1-3-AnyOrgOrPersonal/obj
/1-WebApp-OIDC/1-4-Sovereign/.vs
/1-WebApp-OIDC/1-4-Sovereign/bin
/1-WebApp-OIDC/1-4-Sovereign/obj
/1-WebApp-OIDC/1-5-B2C/.vs
/1-WebApp-OIDC/1-5-B2C/bin
/1-WebApp-OIDC/1-5-B2C/obj
/1-WebApp-OIDC/1-6-SignOut/.vs
/1-WebApp-OIDC/1-6-SignOut/bin
/1-WebApp-OIDC/1-6-SignOut/obj
/2-WebApp-graph-user/2-1-Call-MSGraph/.vs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can omit "Call", right? What other purpose a sample will have with Graph other than calling it :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep it.

/2-WebApp-graph-user/2-1-Call-MSGraph/bin
/2-WebApp-graph-user/2-1-Call-MSGraph/obj
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also save two letters by using just graph instead of 'MSGraph. We only care about one graph now, so the MS` prefix can be omitted

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AAD Graph is still there and for a few years. We want to promote MSGraph, but let's avoid being ambiguous.

/2-WebApp-graph-user/2-2-TokenCache/.vs
/2-WebApp-graph-user/2-2-TokenCache/bin
/2-WebApp-graph-user/2-2-TokenCache/obj
/2-WebApp-graph-user/2-3-Best-Practices/.vs
/2-WebApp-graph-user/2-3-Best-Practices/bin
/2-WebApp-graph-user/2-3-Best-Practices/obj
/3-WebApp-multi-APIs/.vs
/3-WebApp-multi-APIs/bin
/3-WebApp-multi-APIs/obj
/4-WebApp-your-API/.vs
/4-WebApp-your-API/bin
/4-WebApp-your-API/obj
/5-WebApp-AuthZ-Roles-Groups/.vs
/5-WebApp-AuthZ-Roles-Groups/bin
/5-WebApp-AuthZ-Roles-Groups/obj
/6-Deploy-to-Azure/.vs
/6-Deploy-to-Azure/bin
/6-Deploy-to-Azure/obj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This sample shows how to build a .NET Core 2.2 MVC Web app that uses OpenID Conn

![Sign in with Azure AD](ReadmeFiles/sign-in.png)

> This is the first chapter from a set of tutorials. Once you understand how to sign-in users in an ASP.NET Core Web App with OpenId Connect, you can learn how to enable your [Web App to call a Web API on behalf of the signed-in user](../../2.%20WebApp%20calls%20Microsoft%20Graph%20on%20behalf%20of%20signed-in%20user) in a later chapter.
> This is the first phase of a set of tutorials. Once you understand how to sign-in users in an ASP.NET Core Web App with Open Id Connect, can can learn how to enable your [Web App to call a Web API on behalf of the signed-in user](../../2-WebApp-graph-user) in a later chapter

## How to run this sample

Expand Down Expand Up @@ -84,7 +84,7 @@ You can clone this sample from your shell or command line:
```console
git clone https://github.com/Azure-Samples/microsoft-identity-platform-aspnetcore-webapp-tutorial webapp
cd webapp
cd "1. WebApp signs-in users with Microsoft Identity (OIDC)\1.1. in my org"
cd "1-WebApp-OIDC\1-1-MyOrg"
```

> Given that the name of the sample is very long, and so are the name of the referenced NuGet packages, you might want to clone it in a folder close to the root of your hard drive, to avoid file size limitations on Windows.
Expand Down Expand Up @@ -164,8 +164,8 @@ These steps are encapsulated in the [Microsoft.Identity.Web](..\..\Microsoft.Ide

## Next steps

- Learn how to enable [any organization](../1.2.%20in%20any%20org) or [any Microsoft accounts](../1.3.%20with%20work%20and%20school%20or%20personal%20accounts) to sign-in
- Learn how to enable your [Web App to call a Web API on behalf of the signed-in user](../../2.%20WebApp%20calls%20Microsoft%20Graph%20on%20behalf%20of%20signed-in%20user)
- Learn how to enable [any organization](../1-2-AnyOrg) or [any Microsoft accounts](../1-3-AnyOrgOrPersonal) to sign-in
- Learn how to enable your [Web App to call a Web API on behalf of the signed-in user](../../2-WebApp-graph-user)

## Learn more

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This sample shows how to build a .NET Core 2.2 MVC Web app that uses OpenID Conn

![Sign in with Azure AD](ReadmeFiles/sign-in.png)

> This is the first phase of a set of tutorials. Once you understand how to sign-in users in an ASP.NET Core Web App with Open Id Connect, can can learn how to enable your [Web App to call a Web API on behalf of the signed-in user](../../2.%20WebApp%20calls%20Microsoft%20Graph%20on%20behalf%20of%20signed-in%20user)
> This is the first phase of a set of tutorials. Once you understand how to sign-in users in an ASP.NET Core Web App with Open Id Connect, can can learn how to enable your [Web App to call a Web API on behalf of the signed-in user](../../2-WebApp-graph-user)

## How to run this sample

Expand Down Expand Up @@ -83,7 +83,7 @@ You can clone this sample from your shell or command line:
```console
git clone https://github.com/Azure-Samples/microsoft-identity-platform-aspnetcore-webapp-tutorial webapp
cd webapp
cd "1. WebApp signs-in users with Microsoft Identity (OIDC)\1.2. in any org"
cd "1-WebApp-OIDC\1-2-AnyOrg"
```

> Given that the name of the sample is pretty long, and so are the name of the referenced NuGet packages, you might want to clone it in a folder close to the root of your hard drive, to avoid file size limitations on Windows.
Expand Down Expand Up @@ -163,8 +163,8 @@ These steps are encapsulated in the [Microsoft.Identity.Web](..\..\Microsoft.Ide

## Next steps

- Learn how to enable [your organization](../1.1.%20in%20my%20org) or [any Microsoft accounts](../1.3.%20with%20work%20and%20school%20or%20personal%20accounts) to sign-in
- Learn how to enable your [Web App to call a Web API on behalf of the signed-in user](../../2.%20WebApp%20calls%20Microsoft%20Graph%20on%20behalf%20of%20signed-in%20user)
- Learn how to enable [your organization](../1-1-MyOrg) or [any Microsoft accounts](../1-3-AnyOrgOrPersonal) to sign-in
- Learn how to enable your [Web App to call a Web API on behalf of the signed-in user](../../2-WebApp-graph-user)

## Learn more

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This sample shows how to build a .NET Core 2.2 MVC Web app that uses OpenID Conn

![Sign in with Azure AD](ReadmeFiles/sign-in.png)

> This is the first phase of a set of tutorials. Once you understand how to sign-in users in an ASP.NET Core Web App with Open Id Connect, can can learn how to enable your [Web App to call a Web API on behalf of the signed-in user](../../2.%20WebApp%20calls%20Microsoft%20Graph%20on%20behalf%20of%20signed-in%20user)
> This is the first phase of a set of tutorials. Once you understand how to sign-in users in an ASP.NET Core Web App with Open Id Connect, can can learn how to enable your [Web App to call a Web API on behalf of the signed-in user](../../2-WebApp-graph-user)

## How to run this sample

Expand Down Expand Up @@ -90,7 +90,7 @@ You can clone this sample from your shell or command line:
```Sh
git clone https://github.com/Azure-Samples/microsoft-identity-platform-aspnetcore-webapp-tutorial webapp
cd webapp
cd "1. WebApp signs-in users with Microsoft Identity (OIDC)\1.3. with work and school or personal accounts"
cd "1-WebApp-OIDC\1-3-AnyOrgOrPersonal"
```

> Given that the name of the sample is pretty long, and so are the name of the referenced NuGet packages, you might want to clone it in a folder close to the root of your hard drive, to avoid file size limitations on Windows.
Expand Down Expand Up @@ -162,7 +162,7 @@ Open **appsettings.json** and replace the line containing the `TenantId` value w
"TenantId": "organizations",
```

You can also learn from the [1. WebApp signs-in users with Microsoft Identity (OIDC) / in any org/](../1.2.%20in%20any%20org) step of the tutorial if you are interested in this use case. You will also learn how to restrict to this multi-tenant application to specific tenants.
You can also learn from the [1. WebApp signs-in users with Microsoft Identity (OIDC) / in any org/](../1-2-AnyOrg) step of the tutorial if you are interested in this use case. You will also learn how to restrict to this multi-tenant application to specific tenants.

### Option 2: Restrict access to only Microsoft personal accounts

Expand All @@ -182,7 +182,7 @@ You can restrict sign-in access for your application to only user accounts that
"TenantId": "[Enter the domain of your tenant, e.g. contoso.onmicrosoft.com or the Tenant Id]",
```

You can also learn from the [1. WebApp signs-in users with Microsoft Identity (OIDC) / in my org/](../1.1.%20in%20my%20org) step of the tutorial if you are interested in this use case
You can also learn from the [1. WebApp signs-in users with Microsoft Identity (OIDC) / in my org/](../1-1-MyOrg) step of the tutorial if you are interested in this use case

## Toubleshooting

Expand All @@ -208,7 +208,7 @@ These steps are encapsulated in the [Microsoft.Identity.Web](..\..\Microsoft.Ide

## Next steps

- Learn how to enable your [Web App to call a Web API on behalf of the signed-in user](../../2.%20WebApp%20calls%20Microsoft%20Graph%20on%20behalf%20of%20signed-in%20user)
- Learn how to enable your [Web App to call a Web API on behalf of the signed-in user](../../2-WebApp-graph-user)

## Learn more

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ In this phase of the tutorial, you will learn, how to add sign-in users to your

Depending on your business needs, you have the flexibility to decide which audience to sign-in to your application:

1. If you are a Line of Business (LOB) developer, you'll want to [sign-in users in your organization](./1.1.%20in%20my%20org) with their work or school accounts.
1. If you are an ISV, you'll want to [sign-in users in any organization](./1.2.%20in%20any%20org), still with their work or school accounts.
1. If you are an ISV targetting both organizations and individuals, you'll want to [sign-in users with their work and school accounts or Microsoft personal accounts](./1.3.%20with%20work%20and%20school%20or%20personal%20accounts).
1. If you target organizations (work or school accounts), you can also enable your application to sign-in users in [national and sovereign clouds](./1.4.%20in%20national%20and%20sovereign%20clouds).
1. If you are a business wanting to connect with your customers, or with small business partners, you might also want to [sign-in users with their social identities](./1.5.%20with%20social%20identities%20(B2C)) using Microsoft Azure AD B2C
1. Finally, you'll want to let users [sign-out](./1.6.%20and%20lets%20them%20sign-out) of our application, or of the browser
1. If you are a Line of Business (LOB) developer, you'll want to [sign-in users in your organization](./1-1-MyOrg) with their work or school accounts.
1. If you are an ISV, you'll want to [sign-in users in any organization](./1-2-AnyOrg), still with their work or school accounts.
1. If you are an ISV targetting both organizations and individuals, you'll want to [sign-in users with their work and school accounts or Microsoft personal accounts](./1-3-AnyOrgOrPersonal).
1. If you target organizations (work or school accounts), you can also enable your application to sign-in users in [national and sovereign clouds](./1-4-Sovereign).
1. If you are a business wanting to connect with your customers, or with small business partners, you might also want to [sign-in users with their social identities](./1-5-B2C) using Microsoft Azure AD B2C
1. Finally, you'll want to let users [sign-out](./1-6-SignOut) of our application, or of the browser

## Next phases

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To run this sample:

> Pre-requisites:
>
> go through the previous phase of the tutorial showing how the [WebApp signs-in users with Microsoft Identity (OIDC) / with work and school or personal accounts](../../1.%20WebApp%20signs-in%20users%20with%20Microsoft%20Identity%20(OIDC)/1.3.%20with%20work%20and%20school%20or%20personal%20accounts). This page shows the incremental change required to call the Microsoft Graph API on behalf of a user that has successfully signed in to the web app.
> go through the previous phase of the tutorial showing how the [WebApp signs-in users with Microsoft Identity (OIDC) / with work and school or personal accounts](../../1-WebApp-OIDC/1-3-AnyOrgOrPersonal). This page shows the incremental change required to call the Microsoft Graph API on behalf of a user that has successfully signed in to the web app.

### Step 1: Register the sample with your Azure AD tenant

Expand All @@ -47,12 +47,13 @@ If you have not already, clone this sample from your shell or command line:
```Sh
git clone https://github.com/Azure-Samples/microsoft-identity-platform-aspnetcore-webapp-tutorial webapp
cd webapp

```

Go to the `"2. WebApp calls Microsoft Graph on behalf of signed-in use/2.1. using authorization code flow"` folder
Go to the `"2-WebApp-graph-user\2-1-Call-MSGraph"` folder

```Sh
cd "2. WebApp calls Microsoft Graph on behalf of signed-in use\2.1. using authorization code flow"
cd "2-WebApp-graph-user\2-1-Call-MSGraph"
```

In the appsettings.json file, replace, if you have not already:
Expand All @@ -77,7 +78,7 @@ Go to the `"2. WebApp calls Microsoft Graph on behalf of signed-in use/2.1. usin

## About The code

Starting from the [previous phase of the tutorial](../../1.%20WebApp%20signs-in%20users%20with%20Microsoft%20Identity%20(OIDC)), the code was incrementally updated with the following steps:
Starting from the [previous phase of the tutorial](../../1-WebApp-OIDC), the code was incrementally updated with the following steps:

### Update the `Startup.cs` file to enable TokenAcquisition by a MSAL.NET based service

Expand Down Expand Up @@ -208,10 +209,10 @@ HTML table displaying the properties of the *me* object as returned by Microsoft

## Next steps

- Learn how to enable distributed caches in [token cache serialization](../2.2.%20token%20cache%20serialization)
- Learn how to enable distributed caches in [token cache serialization](../2-2-TokenCache)
- Learn how the same principle you've just learnt can be used to call:
- [several Microsoft APIs](../../3.%20WebApp%20calls%20several%20APIS%20(incremental%20consent%20and%20CA)), which will enable you to learn how incremental consent and conditional access is managed in your Web App
- 3rd party, or even [your own Web API](../../4.%20WebApp%20calls%20your%20own%20Web%20API), which will enable you to learn about custom scopes
- [several Microsoft APIs](../../3-WebApp-multi-APIs), which will enable you to learn how incremental consent and conditional access is managed in your Web App
- 3rd party, or even [your own Web API](../../4-WebApp-your-API), which will enable you to learn about custom scopes

## Learn more

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ You can clone this sample from your shell or command line:

```console
git clone https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2
git checkout aspnetcore2-2-signInAndCallGraph
cd "3-WebApp-multi-APIs"
```

In the appsettings.json file, replace:
Expand Down
Loading