microsoft-authentication-library-for-objc icon indicating copy to clipboard operation
microsoft-authentication-library-for-objc copied to clipboard

Catalyst support

Open fahlout opened this issue 5 years ago • 19 comments

Are there any plans to bring catalyst support to this library. I'd love to bring my iPad app to the Mac, but as of the current betas selecting the Mac target on a iOS app results in the project not building.

Screen Shot 2019-08-28 at 9 46 37 AM

fahlout avatar Aug 28 '19 16:08 fahlout

Hi @fahlout, currently we don't support Catalyst in MSAL.

antrix1989 avatar Aug 28 '19 22:08 antrix1989

Are there plans to support it in the future?

fahlout avatar Aug 28 '19 22:08 fahlout

It is under discussion right now.  I will let you know when I have an update.

antrix1989 avatar Aug 28 '19 23:08 antrix1989

Sounds great! Thanks for your quick responses

fahlout avatar Aug 28 '19 23:08 fahlout

Any news on this?

Kemmey avatar Oct 11 '19 09:10 Kemmey

Incase extra support will help it be prioritised- I'd also be very interested in Catalyst support 😄

Oliver-Binns avatar Oct 16 '19 21:10 Oliver-Binns

We found some potential blockers with this feature. To provide a bit more details, conditional access on macOS currently relies on ADAL or MSAL being able to read the macOS login keychain. However, Catalyst apps can only access the iOS-style keychain, so wouldn't be able to complete conditional access policies. We're hoping to be able to work it around in the future, but we cannot provide a definite timeline at this point because it needs to be coordinated with other MDM providers outside of Microsoft.

oldalton avatar Nov 01 '19 04:11 oldalton

Any updates on this? if mac catalyst will be supported?

jatinmishra avatar Jan 18 '21 12:01 jatinmishra

@oldalton I realize it's been a while and understand the limitations, however is there no news on this? Mac Catalyst has become a reality now with Big Sur and I can imagine we'll have more developers adopting it in the near future. MSAL is currently the only external library we rely on that isn't compatible.

guidedways avatar Jan 21 '21 22:01 guidedways

We found some potential blockers with this feature. To provide a bit more details, conditional access on macOS currently relies on ADAL or MSAL being able to read the macOS login keychain. However, Catalyst apps can only access the iOS-style keychain, so wouldn't be able to complete conditional access policies. We're hoping to be able to work it around in the future, but we cannot provide a definite timeline at this point because it needs to be coordinated with other MDM providers outside of Microsoft.

does this limitation applies also on NTLM/Kerberos authentication used in Catalyst apps? I have iOS app that is able to connect to server configured with NTLM authentication and it works fine there. But in Catalyst app on macOS it's not working. Is it due to sandboxing and inaccessibility to macOS login keychain?

BalkiX avatar Feb 18 '21 18:02 BalkiX

We found some potential blockers with this feature. To provide a bit more details, conditional access on macOS currently relies on ADAL or MSAL being able to read the macOS login keychain. However, Catalyst apps can only access the iOS-style keychain, so wouldn't be able to complete conditional access policies. We're hoping to be able to work it around in the future, but we cannot provide a definite timeline at this point because it needs to be coordinated with other MDM providers outside of Microsoft.

does this limitation applies also on NTLM/Kerberos authentication used in Catalyst apps? I have iOS app that is able to connect to server configured with NTLM authentication and it works fine there. But in Catalyst app on macOS it's not working. Is it due to sandboxing and inaccessibility to macOS login keychain?

I don't think access to keychain would impact, but NTLM challenge relies on OS understanding Negotiate/NTLM challenges and forwarding them to us. So I'm not sure if it would work for Catalyst. Have you checked where it is failing? Do we receive an OS challenge but don't handle it, or we don't even receive a challenge?

oldalton avatar Feb 19 '21 22:02 oldalton

In case it helps someone, we managed to support MSAL in our Catalyst app by simply removing && !TARGET_OS_MACCATALYST from line 29 in file MSIDBrokerConstants.m in pod MSAL.

Not sure wether or not this could fix the current issue, and how this could be properly implemented in the original code

deepiksdev avatar Feb 23 '21 10:02 deepiksdev

@oldalton can you please give us an update? It’s been quite some time since the last one. Did you have any progress? Thank you!

hannesjung avatar Sep 23 '21 16:09 hannesjung

We still don't have a clear timeline set for official Catalyst support. @deepiksdev - since MSAL doesn't have official code-level support for Catalyst, such a workaround is not encouraged, since not all of the scenarios would work without an official code-level support from our side.

NerevarineRule avatar Oct 28 '21 22:10 NerevarineRule

Any updates on this?

shanecowherd avatar Dec 02 '21 23:12 shanecowherd

There's currently no update we can share on this one.

mipetriu avatar Dec 09 '21 23:12 mipetriu

It looks like 1.2.2 dropped, any luck it includes support for Catalyst? I need to come up with a solution using MSAL, some Javascript solution or to just pull MSAL out of my app. Thanks!

shanecowherd avatar Jun 30 '22 17:06 shanecowherd

@oldalton Will the conditional access issue blocking Catalyst support be resolved with the new Partner Compliance Management API that will be released for MDM providers this year?

If that will still be a blocking issue, +1 for supporting Catalyst anyway with a big warning that it may not work with some conditional access policies.

esummers avatar Jul 02 '22 16:07 esummers

We don't have a plan supporting Catalyst at this moment

kaisong1990 avatar Jul 21 '22 22:07 kaisong1990

Hi, I'd like to report some issues I've got when I tried to compile for mac catalyst:

Screenshot 2023-02-09 at 14 51 44 Screenshot 2023-02-09 at 14 53 08

If I change the code above to this:

#if TARGET_OS_IPHONE

enum {
#if TARGET_OS_MACCATALYST
#else
		CSSM_ALGID_NONE =                   0x00000000L,
		CSSM_ALGID_VENDOR_DEFINED =         CSSM_ALGID_NONE + 0x80000000L,
#endif
	CSSM_ALGID_AES
};

#endif

then I got a different error:

Screenshot 2023-02-09 at 15 06 40

Here I got no clue on how to fix it.

EddieLukeAtmey avatar Feb 09 '23 15:02 EddieLukeAtmey

Hi @EddieLukeAtmey, we don't have a plan to support Catalyst at this moment.

juan-arias avatar Feb 13 '23 23:02 juan-arias

Analysis of the conversation do date.

  • This is blocked by conditional access which for some reason needs to work differently on mac than on ios.
  • There is a workaround to enable this by editing https://github.com/AzureAD/microsoft-authentication-library-common-for-objc/blob/b866985de1444c74fabe0ce59b96af50a21c9c79/IdentityCore/src/MSIDBrokerConstants.m#LL29C1-L29C1 , which presumably makes the library function identically to iOS.
  • Despite the fact that most cross-platform usage (including logging into apps on MAUI or Avalonia etc.) would only want to enable login and would be happy to have iOS behaviour, the org in charge of this repo decides to block support for everyone if conditional access cannot be enabled.
  • The organization, despite living within Microsoft, doesn't appear to be aware of overall Microsoft cross-platform strategy including MAUI (which is based around maccatalyst) and ADB2C (which is just simple logins) or aware of the needs of its users (only a minority of whom would be interested in conditional access on maccatalyst).
  • There appears to be an understanding of technical details but not an ability to prioritize.

charlesroddie avatar Jun 07 '23 06:06 charlesroddie

Not sure if there are channels of communications within Microsoft but something to put on your radar @davidortinau that this issue makes MSAL incompatible with MAUI on Mac. It's a 1-line change but there is a lot of politics involved. Currently MSAL is the suggested way to do authentication in MAUI so if it doesn't get fixed you'll need a new strategy.

charlesroddie avatar Oct 11 '23 22:10 charlesroddie

@oldalton - could we keep this feature request open ? It is clearly needed by the community in both ObjC and .NET MSALs.

bgavrilMS avatar Nov 23 '23 14:11 bgavrilMS

Why is this Closed? Our product now uses Entra ID for authentication. WIndows, iOS and Android clients - all work. But the Mac client needs to work too As said above, .NET MSAL/MAUI is crying out for it too. https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/3527

poppywood avatar Jan 18 '24 11:01 poppywood

C'mon this is beyond ridiculous. This is the only SDK endorsed by Microsoft to sign in using Microsoft accounts. Adding support for Catalyst on top of a package that worked on iOS has been a non-issue for virtually all packages out there. It's been 5 years since this issue opened.

This is a major platform, blocked based on inexplicable technical reasons, closed as a wontfix. Not exactly inspiring confidence in the SDK. Is there any further explanation on why "macOS style Keychain API" is absolutely required on Catalyst but not on iOS? How do iOS apps on macOS (without Catalyst, just iPad apps on macOS) work around this insurmountable problem? What's preventing Catalyst apps from doing the same?

Androp0v avatar Mar 12 '24 11:03 Androp0v

Anybody interested in knowing how to implement it without the library? I implemented it on my app and I can post a step-by-step tutorial.

reda-drchrono avatar Mar 12 '24 11:03 reda-drchrono

We had to pull auth out of our app because this was never fixed. We ended up with a web login screen that passed a token to the app after successful login.

Honestly, after doing that, I'm not sure I'd ever want to put third party auth code in my app again. It is too vital to the experience.

shanecowherd avatar Mar 12 '24 14:03 shanecowherd