-
Notifications
You must be signed in to change notification settings - Fork 10
Update sample to use WAM #47
base: msal3x
Are you sure you want to change the base?
Conversation
App creation scripts do not work for UWP because you cannot figure out redirect uri. |
@kalyankrishna1 i would like to have your opinion on these changes.
|
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.
I've provided recommendations,
AppCreationScripts/apps.json
Outdated
@@ -1,44 +0,0 @@ | |||
{ |
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 file should absolutely not be removed, as it will break the UWP quickstart in the portal.
Please re-add it.
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 is our UWP quickstart? :( It hasn't been updated since MSAL 4.25 :(
AppCreationScripts/apps.json
Outdated
"x-ms-version": "2.0", | ||
"replyUrlsWithType": [ | ||
{ | ||
"url": "https://login.microsoftonline.com/common/oauth2/nativeclient", |
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.
we need to work with Manoj to have the portal compute the redirect URI of the solution it provides as a zip file.
AppCreationScripts/sample.json
Outdated
"Comment": "Navigate to the Manifest page and change 'signInAudience' to 'AzureADandPersonalMicrosoftAccount'." | ||
}, | ||
{ | ||
"Comment": "Navigate to the Manifest page and change 'accessTokenAcceptedVersion' to 2." |
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 is the right solution. Add a manual step, for instance described with an aka.ms link
private static async Task<string> SignInUserAndGetTokenUsingMSAL(string[] scopes) | ||
{ | ||
// returns smth like S-1-15-2-2601115387-131721061-1180486061-1362788748-631273777-3164314714-2766189824 | ||
string sid = Windows.Security.Authentication.Web.WebAuthenticationBroker.GetCurrentApplicationCallbackUri().Host.ToUpper(); |
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.
We'd want the portal to somehow run this code to get the sid ...
.WithUseCorporateNetwork(false) | ||
.WithRedirectUri(DefaultRedirectUri.Value) | ||
.WithBroker(true) | ||
.WithLogging((level, message, containsPii) => |
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.
Is it still needed?
README.md
Outdated
### Step 2: Register the sample application with your Azure Active Directory tenant | ||
|
||
There is one project in this sample. To register it, you can: |
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.
I would keep this, but provide a manual step.
README.md
Outdated
|
||
1. In `MainPage.XAML.cs`, Update `WithRedirectUri` with `WithDefaultRedirectUri` as shown in below lines of code: | ||
|
||
**Current Code** |
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.
Why remove this part?
No description provided.