Open MikeP0911 opened 4 months ago
Hi @ChismanRaheem, I have included the corresponding code and the screenshots for your reference, kindly check it. Also included the version details in other info section, FYI.. Thanks.
Hi @MikeP0911
It looks like you're encountering an issue where fullData
is coming back null when using IntuneMAMAppConfigManager.Instance.AppConfigForIdentity(GetAccountInfo().Email)
in your MAUI iOS application.
🛠️Here are a few things you might want to check:
Ensure Correct Identity: Make sure that the email you're passing to AppConfigForIdentity
is the correct managed user's UPN (User Principal Name). Sometimes, issues arise if the identity is not correctly specified.
Check Intune Configuration: Verify that the Intune app configuration policy is correctly set up and assigned to the user or device. Missing or incorrect configurations can lead to null values being returned.
IntuneMAMUPN Setting: Ensure that the IntuneMAMUPN
setting is configured in the MDM app config policy. This setting helps the Intune SDK determine the device-managed user and include the MDM app config in the results.
Recommendation: Use a debugger to step through the code and inspect the value of the email variable before it is passed to AppConfigForIdentity. This will allow you to see the exact value being used. And if possible, please write a unite test to ensure that GetAccountInfo().Email
returns the expected email address.
[!NOTE] Ref : https://learn.microsoft.com/en-us/mem/intune/apps/data-transfer-between-apps-manage-ios
Hi @ChismanRaheem
Thank you for the reply, we have IntuneMAMUPN setting already in Intune and also, we have value as proper email in GetAccountInfo().Email method. After going through your steps mentioned above, again rechecked and everything seems to be proper (IntuneMAMUPN keyvalue in configuration and email we are passing to AppConfigForIdentity method), but still, it's not retrieving Appconfig values from Intune in MAUI code. Not sure what went wrong, kindly check this..
Also, kindly share if any sample available for connecting with Intune (MSAL integration) in MAUI IOS app for our reference. Thanks again.
Hi @ChismanRaheem Any update on this? Kindly share if any sample available for connecting with Intune (MSAL integration) in MAUI IOS app for our reference.
Hi @ChismanRaheem to add with the existing issue in MAUI, after updating to latest Intune SDK(version-19.5.0), the method- "public virtual IntuneMAMAppConfig AppConfigForIdentity(string? identity)" is deprecated in IntuneMAMAppConfigManager class and asked to use the new method instead- "public virtual IntuneMAMAppConfig AppConfigForAccountId(string? accountId)" which is also failing to get the AppConfig values from Intune.
So please check this and update as it is a blocker for us. Thanks.
HI @MikeP0911 ,
Thank you for the update we are currently investigating. As for the recommended sample there isn’t a dedicated sample for integrating the Intune SDK with .NET MAUI for Android. However, you can adapt the existing Intune SDK for Android to work with your .NET MAUI project by following the general guidelines for integrating the SDK into Android applications.
For Integrating the Intune SDK with Maui and IOS please use this sample https://github.com/microsoftconnect/sample-intune-maui-ios.git. This sample uses MSAL to authenticate users while integrating with Intune SDK for Maui iOS
Hi @ChismanRaheem, Thanks for the reply.
Also, thanks for providing MAUI sample but we have already referred it for MSAL integration in MAUI. Since the issue is with the latest Intune SDK (version-19.5.0) where the register & deregister methods are deprecated with (IntuneMAMEnrollmentManager.Instance.EnrolledAccount) and there is an issue with the alternative methods mentioned, it would be helpful if you share any sample with the latest Intune version for IOS platform(we have already released Android version of our MAUI app, so no problem in it!!). Also, Appconfig method fails with NULL value in this latest version too, so kindly help to resolve this.
Thanks again..
Hi @MikeP0911
Please validate if the app successfully enrolled before the app attempts to query for app config. Also, when you have time can you generate and upload the MAM SDK logs? Note you that you can have someone from your developer team collect them by calling IntuneMAMDiagnosticConsole.DisplayDiagnosticConsole() to get the same MAM diagnostic log collection available in Edge for Microsoft apps.
@ChismanRaheem - Thanks for the suggestion, sure will check this and get back to you soon.
We are trying to migrate our Xamarin IOS app to MAUI with MSAL integration. Intune logged in successfully and also acquiring access token, but while getting App config values from the Intune portal it returns NULL value, so we are unable to proceed further. This used to work properly in Xamarin.Forms.
Steps to reproduce the behavior:
Expected behavior: IntuneMAMAppConfig for given identity should return corresponding AppConfig values.
Screenshots and logs: Please find below the corresponding code:
` Issue of getting NULL value screenshot is attached below:
Smartphone:
Intune App SDK for iOS:
Additional context: Kindly share if any sample available for connecting with Intune (MSAL integration) in MAUI IOS app.