Closed mjbedford2017 closed 7 years ago
Thanks for using this. Yes this does work with any platform including UWP and Xamarin.
Basically you use ADAL v3 to acquire token by using user login and adal takes care the rest.
However I will write sample and put it to this repo as it could be easier. Please give me a day to prepare.
While I do appreciate you writing a sample app that targets UWP and others may benefit from it, my issue may just be my fault if you say it already works with UWP. I just know that UWP does not allow me to reference Microsoft.IdentityModel.Clients.ActiveDirectory.Platform which is referenced in your test app. So, to re-write a test app in UWP, I could not figure out how to get past that.
I do appreciate you writing a new sample and can certainly wait a day. In the meantime, I will keep playing around to see if I can figure it out too.
Thanks again! Look forward to your sample.
not perfect sample but i just uploaded UWP sample. Please let me know how it helps you.
Hello, I am trying to use your library on UWP to access SFB via my app. This is a great library from what I can tell (when I run the demo app in non-uwp). However, UWP does not allow me to reference the library: Microsoft.IdentityModel.Clients.ActiveDirectory.Platform
Furthermore and related, the class UserPasswordCredential does not exist anymore either. From what I read, this is because Microsoft no longer wants to store passwords. While I understand this approach for most scenarios, there is certainly still a case for it. Aside from that, it seems the library will work just fine on UWP. However, as you know, this breaks everything because I cannot get the token, etc... without the password.
In days of research, I found this beauty. It is a hack or workaround to the problem. Basically, instead of using AcquireTokenAsync and passing in a UserPasswordCredential, I am able to use this code and successfully acquire a string which is the token. The issue is, I do not know how to inject this into your library the correct way so everything else downstream still works. In other words, I know that you typically get a bit more than just a string of the token but rather, an AuthenticationResult. While the token is part of that AuthenticationResult, it is not the only part of it. Any ideas how to correct this issue so the library will work on UWP OR inject my workaround into your library?
Thanks!