ms-intune-app-sdk-ios
ms-intune-app-sdk-ios copied to clipboard
[.NET MAUI] - Account Enrollment does not working as expected
Microsoft Intune App SDK for MAUI.iOS Issue
Summary
Describe the bug: We have an app using MS Intune SDK and it worked great on previous iOS versions like 17.0 and 17.2. Unfortunately it stopped working in versions greater than or equal to 17.4. Our process is: We ask the user for username and password, then authenticate them through the MSAL library. After that, we will register the authenticated account, using the RegisterAndEnrollAccount method, this seems to work well, as I detected in my logs, the return status "MAMEnrollmentStatusNewPoliciesReceived", however we have a policy for the user to define a PIN or use biometrics to continue accessing the application. In previous versions of iOS, this process worked normally, but after updating to the latest iOS, the application, instead of displaying the screen for entering the PIN or using biometrics, the app simply goes to the background, and this did not generate a crash, as I did not detect any crash report logs on my devices. A curious fact is that this process works in simulators in all versions, we can also see how it works on any physical device when we compile the application in DEBUG mode. So when I realized this, I used the same RELEASE settings in DEBUG mode, and even so in DEBUG mode everything works normally, but when we change to RELEASE mode, it only works in the simulators. Link is enabled as SDKOnly and we have a Linker.xml file to avoid deleting MS Intune SDK references.
To Reproduce Steps to reproduce the behavior: Using a iOS device with version greater or equal to 17.4 in release mode, and also have a policy defined requiring a PIN or biometrics: 1- Authenticate the user using the MSAL Library (Microsoft.Identity.Client v4.61.3) 2- Call the RegisterAndEnrollAccount with the identifier returned by MSAL Library 3- Wait for the PIN/Biometrics page to appear (it never happens)
Expected behavior: PIN/Biometrics page should appear after the RegisterAndEnrollAccount completes successfully
Intune App SDK for iOS (please complete the following information):
-
For errors during build, does the app build without Intune SDK integration? YES
-
For errors post build, does the app launch without being Intune SDK integrated? YES
-
Who is the customer? All of them
-
Do you see a trend with it only being reproduced on a specific device? Any iOS/iPad with version greater or equal to 17.4
Details
- Device: any iPhone or iPad
- iOS Version: >= 17.4
-
Microsoft.Intune.Maui.Essentials.iOS
Version: 19.4.0 - Build Operating System (Mac, Windows) and Version: Mac OS Sonoma
- Visual Studio Version: N/A
Screenshots and logs
- I have logs collected from iOS System using the console from XCode - I would like to share it private, because have some sensitive user informations
- Also have internal logs of my application, containing all the steps - I would like to share it private, because have some sensitive user informations
- And also we have the reference log generated by Intune SDK which is: 78CCD4
Questions to Ask Before Submission
- Does the app build and launch without including the
Microsoft.Intune.Maui.Essentials.iOS
package? YES - Does the issue reproduce if you rebuild after deleting the
bin
andobj
output folders? YES - Have you checked the .NET MAUI repository for similar issues? If so, please follow the guidance there or add that information to this issue. - No similar issues
- Are you using the latest
Microsoft.Intune.Maui.Essentials.iOS
NuGet package version? 19.4.0