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

Missing PrivacyInfo.xcprivacy (Apple Privacy Manifest file) for use of NSUserDefaults

Open Cybrosys opened this issue 1 year ago • 2 comments

MSAL client type

Public

Problem statement

As of May 1, 2024, it will be mandatory for iOS, iPadOS, and tvOS apps to include a privacy manifest files. It is possible for libraries to include one as well, otherwise the app developer has to go through the code from third-party libraries/SDKs in order to make sure the file provided with the app is correct.

From what I can see, the code in IntuneEnrollmentIdHelper.se accesses NSUserDefaults which requires an entry in a PrivacyInfo.xcprivacy file indicating how it is used.

https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278401

Proposed solution

Add a privacy manifest file to the Microsoft.Identity.Client NuGet package for iOS that declares its usage of NSUserDefaults.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>NSPrivacyAccessedAPITypes</key>
    <array>
        <dict>
            <key>NSPrivacyAccessedAPIType</key>
            <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
            <key>NSPrivacyAccessedAPITypeReasons</key>
            <array>
                <string>...</string>
            </array>
        </dict>
    </array>
</dict>
</plist>

Alternatives

No response

Cybrosys avatar Mar 26 '24 10:03 Cybrosys

Is there a status update regarding this? Maybe someone could update the documentation with the values that are needed in the PrivacyInfo.xcprivacy when using the package?

Cybrosys avatar May 16 '24 09:05 Cybrosys

Assigning to myself to investigate and have a resolution.

localden avatar May 19 '24 02:05 localden