-
Notifications
You must be signed in to change notification settings - Fork 1k
Enhancing multi tenant sample #206
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
Conversation
Calling Graph Few refactoring
README update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good @TiagoBrenck
however, I was not able to have the sample work after running the app creation scripts when going through the emboarding process. I got the following:
AADSTS50011: The reply url specified in the request does not match the reply urls configured for the application: 'f4378b43-1d37-404f-82c1-704914b95f18'.
It's not registering https://localhost:44321/Onboarding/ProcessCode
as a redirect URI
I wonder if we don't want to plan an enhancement to use the Graph SDK (instead of hand crafting classes for the Graph response). What do you think @kalyankrishna1 ?
In the other samples we use the reduced license header, not the full one.
"PasswordCredentials": "Auto", | ||
"RequiredResourcesAccess": [ | ||
{ | ||
"Resource": "Microsoft Graph", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The chapter 1 is about signing-in to a web app? not calling graph?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmprieur are you sure you have the latest version? I reverted this change already.
## About this sample | ||
|
||
This sample shows how to build an ASP.NET Core MVC web application that usesOpenID Connect to sign in users from multiple Azure AD tenants. Additionally it also introduces developers to the concept of a [multi-tenant](https://docs.microsoft.com/azure/active-directory/develop/single-and-multi-tenant-apps) Azure Active Directory application. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we want to mention why it calls the graph? and also that it calls ARM?
@jmprieur I am using the Graph SDK. It is on MSGraphService.cs |
my bad, @TiagoBrenck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I tested an it works great
the only thing I'd change is the UserSecretsId> value in the csproj because this project is so different from the others that we'd want it to be unique
Keeping the same value for this one could impact negatively users who do several chapters (It did impact me and it took me a while to figure out that it was picking-up secrets and client ID of the other chapters)
Ok @jmprieur I will change. Me and Kalyan also discussed a better flow for the onboarding on the navigation menu, so I will update it as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @TiagoBrenck
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with reviews.
Purpose
A multi-tenant app goes beyond setting
organizations
as tenant. There are more topics that are essential for a developer to know when developing a simple multi-tenant app.With help @kalyankrishna1 's help, we enhanced the multi-tenant sample to cover the topics:
This new sample is not a level 100 anymore, since it brings more complex topics. In order to provide a better experience, it uses a SQL DB, but there is the option of running it using in memory DB (thanks to EntityFramework).
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test
Get the code
Test the code
The DB will be created automatically. If you want to run it using
InMemory
DB, read the line 48 onStartup.cs
Ideally you will want to have 2 tenants to test it.
What to Check
Verify that the following are valid
Other Information