Which Version of MSAL are you using ?
Note that to get help, you need to run the latest version. Preview version are also ok.
For ADAL, please log issues to https://github.com/AzureAD/azure-activedirectory-library-for-dotnet
3.0.8
Platform
Xamarin.Android
What authentication flow has the issue?
Other? - please describe;
Is this a new or existing app?
new application
Repro
clone https://github.com/Azure-Samples/active-directory-b2c-xamarin-native
upgrade nuget package from 3.0.5-preview to 3.0.8 watch the android app break because of missing class AuthenticationContinuationHelper. weirdly the class is found in iOS project.
```csharp
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
base.OnActivityResult(requestCode, resultCode, data);
AuthenticationContinuationHelper.SetAuthenticationContinuationEventArgs(requestCode, resultCode, data);
}
Expected behavior
AuthenticationContinuationHelper should be a known class
Actual behavior
AuthenticationContinuationHelper class not found
Possible Solution
problem with nuget package?

Hi @markti , I think I know what is going on. In MSAL 3.0.8 we've set the minimum version of Xamarin.Android to 9.0; Your project probably targets a previous framework.
So what Visual Studio will do (actually NuGet), is try to match MSAL to your poject. MSAL is multi-frameowrk, and supports Xamarin.Android 9 and NetStandard 2. NuGet will try to use the Xamarin version first, but it fails, because your app uses a lower version. It will then try to use the NetStandard version.
However, NetStndard version of MSAL has no Activity, AuthenticationContinuationHelper or any other Android specific type. This is why you see the failure.
We will look into making MSAL support a lower version of Android (@jennyf19 , @henrik-me @MarkZuber - I was under the impression that we support both N and N-1 for Android?).
In the meantime, could you just have your android head target Android 9 please? As far as I know, this only affects the SDK, not where your app can be intalled.

omgeesh, you're right. I'm targeting Oreo 8.1...what is specific about 9.0 that's needed?
3.0.5-preview was working on oreo...why the change to 3.0.8?
Well, there are a couple of Xamarin dependencies that MSAL requires and we bumped them to a later version. These seem to require Mono.Android 9.
<PackageReference Include="Xamarin.Android.Support.CustomTabs" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="28.0.0.1" />
Still, you should be able to use the SDK 9 but still target pretty much any version of Android. This is just the SDK, not the runtime. You can use SDK 9 but target a Android 7.1 (API level 25).

thanks @bgavrilMS … i am upgrading the https://github.com/Azure-Samples/active-directory-b2c-xamarin-native project to 28.0.0.1...
just want to get this working stably so I can get some bearer tokens to develop my app against my API...ugh...my service fabric cluster hosting my WebAPI is burning a hole in my pocket while I figure this out!
its either Xamarin versions, iOS simulator not working, android simulator not working, iOS physical device not working, android physical device not working...back and forth like a ping pong ball!
will it support a minimum API version of 23??? my test device is API 23.
I don't see why not, you can configure what minimum API version to use. The target framework is just the SDK.




uff da...

maybe i need to update Xamarin.Forms...
No, there's no need for that. There are too many versions in Android and it gets confusing. You need to update the version of the SDK against which your app is compiled. You can do this 2 ways:

<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
i did that (through the gui)

Ok, let me look directly at that sample. I will get it to work and push a PR onto it.
uff da. Xamarin.forms upgrade broke everything in android...lol

I did the following:
also, it would be nice if somebody built a demo using Xamarin Shell. I am trying to follow the Tailwind traders example which uses a very nice decoupling of the Authentication provider from the App itself but the AAD B2C demo does a whole bunch of tight coupling with the App.xaml.cs which is kinda nasty...
Ok, so hopefully you're not blocked. There are a bunch of bug fixes between 3.05 and 3.0.8 but nothing major if memory serves.
I'm blocked because I'm trying to figure out the best way to enable signin/signup using Xamarin Shell and move to that. using Tailwind traders as my model. Once I get nav/auth working i am going to move all my other pages into this new project and continue dev.
@markti did you check the Android csproj and make sure that Microsoft.Identity.Client is under \MonoAndroid90\ and not \netstandard1.3\? You might have to manually change the file path, then the class you need will be available.
forking and starting over...
kinda early in seattle eh? :)
I'm based in Cambridge UK :) Most of the team is in Seattle. We just like to offer 24h service like that :D
You caught us during our shift change... from UK support to Seattle area support. Lol
clean clone and working on android API 23 device...but this is only working on 3.0.5-preview @jennyf19

now to upgrade to 3.0.8...


rebuild after nuget upgrade...now seeing missing class in android only...

changing target framework to android 9.0

rebuild android project...

same error...
checking packages.config...Microsoft.Identity.Client is targetframework monodroid81

however, nuget is in following folder

D'ISSA BOM BAD!!! MEESA TINKS!
found the issue, ja?

however monodroid81 is all over the place in my packages.config...what would cause it to bump to monodroid90?
@jennyf19 @bgavrilMS Shall I upgrade the Xamarin.Android.Support.* projects from 27.0.2 to 28.0.1?
Interesting....thanks for all the info, @markti ...could you try manually changing the file path in the Android csproj (to make sure the MSAL file path is in the correct location), and see if that unblocks you for now?
Oh interesting, I gotta check the csproj too...

look at that nasty!
manually changed to monodroid90...rebuild...
if this works ill submit a PR back from my fork...
working on 3.0.8 after manually changing the path in the csproj....

@markti so you're unblocked now? I'll take a look at the PR :) Thanks.
@markti closing...thanks for the help today.
@markti : thanks a ton for your contributions!
Most helpful comment
@markti closing...thanks for the help today.