Skip to content
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

[Feedback Request] What do you think of MSAL 3.0.0-preview? #933

Closed
jmprieur opened this issue Mar 1, 2019 · 18 comments
Closed

[Feedback Request] What do you think of MSAL 3.0.0-preview? #933

jmprieur opened this issue Mar 1, 2019 · 18 comments
Assignees
Labels

Comments

@jmprieur
Copy link
Contributor

jmprieur commented Mar 1, 2019

We just released MSAL.NET 3.0.0-preview

See https://aka.ms/msal-net-3x for details.

We'd like to get your feedback

In particular on:

Feel free to respond to this issue with your feedback on recommendations

@dansiegel
Copy link

@jmprieur I do like the new fluent API in 3.0... I do not like that it is still expecting the UIParent which is really more relevant for Android as I recall from our previous conversations. This should be moved to PublicClientApplicationBuilder where specifically for Android you should add WithActivity. This means that the PCA can be built at the Platform level and injected with DI... everything after that should work great.

@bgavrilMS
Copy link
Member

Hi @dansiegel - thanks for the feedback. We also feel the acquire token silent needs work. It's not trivial to come up with the right API here because on Android devs need to pass in the Authority. On other platforms a parent window can be used simply so that we can center the webui.

We discuss this in more detail, along with an API proposal, here:

#918

@jmprieur
Copy link
Contributor Author

See also #949 and #918 (comment)

@HappyNomad
Copy link

I'm beginning with MSAL and haven't experienced the 2.0 API. From what I can tell, the 3.0 one is better and more flexible. In the interest of those improvements, and to make the current API less crowded, please depreciate the 2.0 members in the 3.0 release and outright remove them in 4.0.

@HappyNomad
Copy link

I found only this sample that's for AD B2C and uses the MSAL v3 API. Does it reflect best practices? I have some doubts that I asked about here and here.

@jmprieur
Copy link
Contributor Author

jmprieur commented Apr 8, 2019

@ChainReactive
thanks for the feedback.
B2C is a bit special (as the notion of policy does not appear directly in the API model), and we are a bit behind on updating the B2C samples, but that's definitively something we are working on. See for instance this issue (#911), and also this branch (https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/tree/jennyf/b2cPrototype) where @jennyf19 where we are discussing surfacing B2C policies as a first class concept in the API.

@zedthehead
Copy link

I found only this sample that's for AD B2C and uses the MSAL v3 API. Does it reflect best practices? I have some doubts that I asked about here and here.

There's a pretty good sample that's just been updated to v3 here : https://github.com/Azure-Samples/active-directory-dotnet-admin-restricted-scopes-v2

@zedthehead
Copy link

Any examples anywhere of calling SharePoint Online search API using MSAL v3?

@jmprieur
Copy link
Contributor Author

All the Azure AD samples are available from https://aka.ms/aaddevsamplesv2 and all the .NET one use the new MSAL 3.x API.

There are a few B2C samples using MSAL.NET 3.x already

For SharePoint online search API, what is the name of the resource @zedthehead ? can you see it in the app registration portal: https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-configure-app-access-web-apis#add-permissions-to-access-web-apis ?

@dansiegel
Copy link

Does it reflect best practices?

@ChainReactive I would tend to say overwhelmingly the norm of Microsoft samples... assume they're following worst practices for a Proof of Concept.

@zedthehead
Copy link

In the api permissions page it is listed as Sites.Search.All under the SharePoint sub-heading/group. The name of the scope is given as https://microsoft.sharepoint-df.com/Sites.Search.All. Currently I'm trying to port an ASP.NET MVC5 project from ADAL to MSAL v3 using the https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/url sample as a guide

@ghost
Copy link

ghost commented May 7, 2019

I posted an example app and instructions for setting up the Portal for a WPF client app that uses Azure AD with MSAL 3.0.8 for authentication and accessing the Key Vault.

Waiting on MSAL support for authenticating Azure Functions, then the MSAL use cases will be complete for my app.

For the sample, I extracted the MSAL code into a service file and helper file. Essentially removing the MSAL code from the UI code.

Hope this can help someone.

Example Azure AD, MSAL 3.0.8 authentication for login and Key Vault

@bgavrilMS
Copy link
Member

Thanks @kdawg1406 , I didn't know MSAL is not compatible with Azure Functions. I think it is, as MSAL is feature complete, but we will need to do some digging to understand what's blocking Azure Functions.

@ghost
Copy link

ghost commented May 7, 2019

@bgavrilMS thank you very much. I and many customers would really like to use MSAL for our authentication scenarios. I've spent several days trying to configure the Portal and required code, but no joy. So many blog posts and examples that show the Portal are from previous versions of the Portal, making it very challenging to follow and be successful.

Greatly appreciate any sample and walk-through of the Portal setup to get this working.

Best to you,

Karl

@bgavrilMS
Copy link
Member

@jmprieur has been in conctact with the folks in Azure Functions as they need to make some changes on their end first.

@jmprieur jmprieur self-assigned this May 20, 2019
@jmprieur
Copy link
Contributor Author

Assigning to me to investigate and close the loop with Azure functions.

@ghost
Copy link

ghost commented May 30, 2019

@jmprieur does MSAL 3 support Azure AD auth for Azure Functions? As of MSAL 3.0.8 it does not work.

Is it corrected now?

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants