AzureAD/azure-activedirectory-library-for-dotnet

Brokered authentication in iOS 13 not working

Closed this issue · 18 comments

I'm using ADAL.Net v5.2.2
I'm using Microsoft Authenticator app v6.4.6

Opens up Authenticator app fine but as soon as I pick my account it bombs out with Something Went Wrong error message and doesn't return anything to my iPhone app ?

Any assistance or advice on this matter would be appreciated (I've also tried ADAL 5.2.7)

Hi @mfeatherSTAR - Apple introduced some changes in iOS 13 that broke our integration with Authentication. I believe we've captured all this with #1642 and some other changes.

Can we get some logs please to investigate further, using the latest ADAL ?
Also, please consider moving to MSAL. ADAL is now deprecated and we will only fix critical issues (although I would think this qualifies).

@mfeatherSTAR : Is this only an issue on iOS13? Did it use to work?
Apple has been sending out hotfixes to iOS13 for issues which impacted brokered scenarios, did you validate ensuring you are using the very latest iOS13 updates from Apple?

Thanks for providing the incident id. We will look at the logs.

@mfeatherSTAR : Thanks, from what I know the 13.5 is required to rule out iOS 13 OS issues.

@mfeatherSTAR : unfortunately the logs doesn't really say anything else, thus if updating to 13.5 doesn't solve the issue we would need a repro to be able to dig further.

It will help if you retry using the latest MSAL and ensure you follow all the steps as described in:
MSAL iOS Broker steps

If after updating iOS, following the 7 steps (pay special attention to the entitlements), redirect uri things still doesn't work, please provide the entire detailed MSAL log, the entitlements file as well as the plist.info (will provide an email address should that be needed)

With regards to I’d like the official answer on whether this is possible: InTune integration with Conditional Access Policies, thereby requiring Brokered Authentication…..using latest ADAL library ? - I can confirm that you can use MSAL. Where are these docs please, I will try to get them changed.

We do however have quite a few folks who have integrated with ADAL as well and its working for them, hence the thought that a configuration is wrong - ussually the bundle id or the keychain setting.

@mfeatherSTAR - I sent you a package for you to try out with via email, please let me know if you received it.

@mfeatherSTAR - apologies for getting our comm channels mixed up. Could you send me an email at bogavril @t microsoft com and I'll follow up with the package? GitHub does not allow me to upload nuget packages.

Thanks. Package received. Still not working. I've added output from my Pii enabled ADAL logs to the file share I was provided via Microsoft support.

I did follow up on the logs, and I wasn't able to find any problems ADAL side. I read the authenticator logs and there may be a problem there, but I don't have expertise in that. We typically need an incident (iCM) to transfer tickets from one team to another, since all engineers are very busy during these times and they need to prioritize.

Given that we prioritize MSAL issues over ADAL issues generally, and that using MSAL works, we highly recommend you moving to MSAL.

In case it helps anyone else this enabled me to get past the "Something Went Wrong" message:

Make sure that your Redirect URI and application's bundle id is all in lower case.

Thank you @bgavrilMS , @henrik-me

@mfeatherSTAR, glad that you got this working, and thanks for updating the issue with your finding.

Yeah, that's a wierd bug which we fixed in MSAL.

redirect uri is based on bundle id. But URIs in .net are lowercased, while the Authenticator expects case sensitivity to be preserved.

the difficulty is that the Authenticator logs do not make it clear what goes wrong, so this problem is difficult to trace.