AzureAD / azure-activedirectory-library-for-objc

The ADAL SDK for Objective C gives you the ability to add support for Work Accounts to your iOS and macOS applications with just a few lines of additional code. This SDK gives your application the full functionality of Microsoft Azure AD, including industry standard protocol support for OAuth2, Web API integration with user level consent, and two factor authentication support.
MIT License
178 stars 113 forks source link

Error with Enrollment IDs #1539

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hello,

When using version 4.0.8, our app keeps getting this error
ADAL 4.0.8 iOS 13.4.1 [2020-06-13 00:46:43 - 29668F82-6F3C-4ADB-A38F-C764416E8BF2] Error looking up enrollment ID Error with code: 3840 Domain: NSCocoaErrorDomain ProtocolCode:(null) Details:Could not de-serialize Intune Enrollment ID JSON: <Error Domain=NSCocoaErrorDomain Code=3840 "No value." UserInfo={NSDebugDescription=No value.}>. Inner error details: Error Domain=NSCocoaErrorDomain Code=3840 "No value." UserInfo={NSDebugDescription=No value.}

After debugging, it turns out out this function [ADEnrollmentGateway allEnrollmentIdsJSON]; return an empty string causing deserialization failure. This error is constantly appearing in our app. Is there something the app needs to do in order to mitigate this? We are also using intune.

oldalton commented 4 years ago

Thanks for bringing this up. I believe this error would only show up in logs and not impact your app directly? I agree that we should fix the logging, just wanted to confirm how severe is the issue. Thanks.

ghost commented 4 years ago

Correct, it does not impact the app - but it bloats our logs as half the logs are 3840 could not find intune enrollment ids. Is there a way to mitigate this until a fix comes in?

jasoncoolmax commented 4 years ago

We are trying to fix it in our next release. Meanwhile, I think the workaround could be filtering that particular log statement at the app level.

antrix1989 commented 4 years ago

Addressed in this pr.