AzureAD / microsoft-authentication-library-for-dotnet

Microsoft Authentication Library (MSAL) for .NET
https://aka.ms/msal-net
MIT License
1.36k stars 330 forks source link

[Bug] Getting type or namespace not found error while using BrowserTabActivity #4819

Closed rohitnahatam closed 1 week ago

rohitnahatam commented 1 week ago

Library version used

4.61.3

.NET version

netstandard2.0

Scenario

PublicClient - mobile app

Is this a new or an existing app?

The app is in production, and I have upgraded to a new version of MSAL

Issue description and reproduction steps

I am currently using 4.60.3 and trying to upgrade to 4.61.3. After upgrade , I am getting this error for BrowserTabActivity. I was looking at the documentation but couldn't find any change related to this. Error - The type or namespace name 'BrowserTabActivity' could not be found (are you missing a using directive or an assembly reference?)

Co-pilot was suggesting to use Activity instead of BrowserTabActivity, but couldn't find any supporting sample code for the same to validate if it is okay to use.

Relevant code snippets

using Android.App;
using Android.Content;
using Microsoft.Identity.Client;

namespace Droid.Login
{
    [Activity(Exported = false)]
    [IntentFilter(new[] { Intent.ActionView },
            Categories = new[] { Intent.CategoryBrowsable, Intent.CategoryDefault },
            DataHost = "auth",
            DataScheme = "msalxxxxxxxxxxxxxxxxxxxxxxxxxxxx")]
    public class MsalActivity : BrowserTabActivity
    {
    }
}

Expected behavior

The code should be built successfully.

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

No response

Solution and workarounds

No response

bgavrilMS commented 1 week ago

Are you still using Xamarin? Or is this a MAUI app?

Possible duplicate of https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/4817

rohitnahatam commented 1 week ago

yes, we are still using Xamarin. I was able to proceed with 4.60.4, Thanks.

rohitnahatam commented 1 day ago

@bgavrilMS Just wanted to check if there is a timeline till when you will be fixing the security vulnerabilities in 4.60? Asking this as we are still using Xamarin and there isn't plan to migrate to MAUI yet.