Hello,
I have a system, which is able to execute bash/zsh scripts on a set of machines.
The default behaviour is that the signature of the script is checked on the machine, which is executing it, and in case if it is not signed properly, the system rejects the execution.
An own certificate has to be created for signing the scripts, which means that the certificate has to be installed and marked as trusted on the target machines (which are executing the script).
I've been using :
"/usr/bin/security add-trusted-cert ..."
command to install the certificate on the machines as trusted.
Since macOS Big Sur, the above command was prompting the local user for admin credentials. To avoid this, Apple suggested to use the following command to temporarily disable and re-enable the confirmation dialog :
1.:
/usr/bin/security authorizationdb write com.apple.trust-settings.admin allow
2.:
/usr/bin/security authorizationdb write com.apple.trust-settings.admin admin
Now with the release of macOS Sequoia, the above command :
"/usr/bin/security authorizationdb write com.apple.trust-settings.admin allow"
does not work any more.
It gives the following output :
NO (-60005)
I have the following questions :
1.: Could you please suggest an alternative way for IT administrators to install certificates on their machines, without any user confirmation?
2.: Could you please suggest how the same could be achieved using a bash/zsh script? In which context could the above commands :
"/usr/bin/security authorizationdb write com.apple.trust-settings.admin allow"
and
"/usr/bin/security authorizationdb write com.apple.trust-settings.admin admin"
still work?
Thank you for your help in advance!
Device Management
RSS for tagAllow administrators to securely and remotely configure enrolled devices using Device Management.
Posts under Device Management tag
192 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I am looking into bypassing the following popup when setting up an iPhone 15 Pro:
Would the SkipKey SIMSetup allow to bypass having the following window popup upon initial setup? So far all settings are bypassed during the initial setup of the phone and the application of Wi-Fi. The only issue present in the setup I want to achieve is prohibiting this window regarding eSIM set up.
We are in the process of replacing the TripleDES algorithm with AES in our MDM solution. However, after switching the encryption algorithm, we encountered the following error on Apple devices during enrollment:
Error: "-26275 error decrypting response payload (mdmclient(SCEP))"
Do Apple devices support AES encryption during the enrollment process, or are there any known limitations that prevent its use?
Technical Details:
During enrollment, when the device attempts to install the Management Profile, it requests the MDM server to retrieve the device certificate from the SCEP URL.
We send the certificate by creating Enveloped CMS content, using TripleDES as the algorithm identifier. If we switch the algorithm to AES, we observe the error mentioned above.
We are also using TripleDES when preparing the CMS content for the enrollment profile, which works without issues.
A profile that contains setting of allowVPNCreation is false was installed duiring activation in my requirements.
The iOS version is 18.
AllowVPNCreation is first, setting the app's network is second, the app can't use network.
Setting the app's network is first, AllowVPNCreation is second, the app works well.
For example:
Scene 1
Step 1: Install a profile that contains a setting where allowVPNCreation is false during activation.
Step 2: Complete activation and enter the main screen.
Step 3: Tap App Store, the screen displays network unavailable, needs to be set in Setting.
Step 4: Open the network setting for App Store, but still closed.And the network settings for other apps are all closed;
Step 5: Remove the profile.
Step 6: After a minute, opening the network setting for App Store is work.
Result: AllowVPNCreation effects app's newtork after entering the system for the first time. It don't happen below iOS 18.
Scene 2
Step 1: The app's network setting is ok.
Step 2: Install a profile that contains a setting where allowVPNCreation is false.
Result: No effect。The same result below iOS 18.
Is this a bug or new features, how to handle?
Could you please provide guidance on what is required to set up an Apple MDM server from scratch? Specifically, I would like to understand the necessary steps, tools, certifications, and best practices involved in the process. Any resources or documentation you could recommend would also be appreciated.
I have a macOS app with Network Extension. It requests VPN permission with the code like this:
self.tunnelManager = [NETunnelProviderManager new];
NETunnelProviderProtocol *protocol = [NETunnelProviderProtocol new];
protocol.providerBundleIdentifier = @"com.myapp.macos.tunnelprovider";
self.tunnelManager.protocolConfiguration = protocol;
[self.tunnelManager setOnDemandRules:nil];
[self.tunnelManager setOnDemandEnabled:NO];
[self.tunnelManager setEnabled:YES];
[self.tunnelManager saveToPreferencesWithCompletionHandler:^(NSError * _Nullable saveError) {}];
A lot of my app users are businesses and they would like to have pre-install VPN config. We currently do it like this:
<array>
<dict>
<key>PayloadDisplayName</key>
<string>MyAppName</string>
<key>PayloadType</key>
<string>com.apple.vpn.managed</string>
<key>UserDefinedName</key>
<string>MyAppName</string>
<key>VPN</key>
<dict>
<key>AuthenticationMethod</key>
<string>Password</string>
<key>ProviderBundleIdentifier</key>
<string>com.myapp.macos.tunnelprovider</string>
<key>ProviderDesignatedRequirement</key>
<string>anchor apple generic and identifier "com.myapp.macos.tunnelprovider" and (certificate leaf[field.1.2.3] /* exists */ or certificate 1[field.1.2.3] /* exists */ and certificate leaf[field.1.2.3] /* exists */ and certificate leaf[subject.OU] = "123")</string>
<key>RemoteAddress</key>
<string/>
</dict>
<key>VPNSubType</key>
<string>com.myapp.macos</string>
<key>VPNType</key>
<string>VPN</string>
</dict>
</array>
Now, if the users installs my app first and allows the VPN permission, then MDM will set the profile above to the user, the user will end up with two VPN profiles in settings. They will be called "My App" and "My App 1"
At first we thought it's harmless, but users with two VPN profiles sometimes have app update issues, where after update the newer version of client fails to communicate with the older version of tunnel, it cannot even tell it to quit. The tunnel must be force-quit by the user in this case.
We suspect two profiles to be the reason for that. Is there a way to make sure duplicate VPN profiles do not happen?
Under iOS 18.0.1, I can't do any development that uses HTTPS, because I can't authorize my generated certificates on my phone. This was not a problem in the past.
Normally you AirDrop a root certificate authority to your phone, install the "profile" for it, and then trust it in Settings / General / About / Certificate Trust Authority. Then you can connect to another server on your network that's using the accompanying certificates.
But after sucessfully installing two profiles on my phone, neither shows up in Certificate Trust Authority. Anybody else seeing this?
This problem, in combo with this one (which prevents running on my Mac as an iPad app) has completely halted my project.
I've found reports of this problem that blamed an empty "common name" field in the certs, but that field is populated in both of these.
Hello Team,
I want to know if there's a way to uninstall System Extension without prompting the user for authorisation.
These are ways I found to uninstall System Extension
The deactivationRequest api prompts the user for uninstalling System extension.
If I use Apple script to drag and drop the application[which is embedded with System Extension] to trash also prompts the user.
The only workaround that doesn't prompt is by disabling SIP and using the systemextensionsctl uninstall command.
I want to know if there's any other solution that can uninstall System Extension without prompting the user for authorisation.
Thanks!
macOS devices- dep enrolled device - configured an email policy and it gets stuck on pending status. The rest of the policies and actions like lock device and scan device are executed successfully.
While enrollment using DEP, if there is account creation config present in Dep configuration profile , At the time of enrollment we don't receive the user token and user channel is not present.
The keys UserID and EnrollmentUserID in TokenUpdate is not present.
As a result we can't successfully push the email policy. Is the inference correct or is there anything else we are missing out.
out of 37 devices, 7 are inactive( al are ios ). We have checked one of the devices and the broadcast message was sent successful. Additionally, Cx confirmed that the location history is shown properly. We restarted the device, checked the date and time, and found it to be correct. We also switched to a different network, but that doesn't change anything. The sync from the Hexnode app was successful. We reinstalled the MDM profile, yet it doesn't change anything. We renewed the APNs once and checked, but the scan device action remains pending.
Hi everyone,
We are currently integrating Apple DDM into our existing MDM system and encountered an issue where an update to a declaration failed with the message: "Activation xxxxx is missing configurations." While we know how to fix the issue, I'm quite concerned about potential impacts.
An incorrect activation could deactivate the current one, leading to the automatic removal of all profiles and apps. Given that unexpected server errors can occasionally occur, this could significantly impact end-users if their apps are suddenly removed.
I'm looking for a way to prevent activations from "failing to update then lost everything" or a safer method to deploy updated version of activations, especially given the potential for unexpected server errors or logic bugs. This could significantly affect end-users if their apps suddenly disappear.
If anyone has any insights, thoughts, or best practices to share regarding activation updates, I would greatly appreciate your input.
Leo Chan
btm_launchagent.txt
I have a menu bar app which should be triggered to start when a system extension is successfully installed.
The menu bar app is configured as a agent which should be started by SMAppServer.
SMAppService register/unregister the agent successfully when the program is running locally.
When doing the program installation through JamfNow, which is a MDM system, it fails with following error.
I think the problem here is that the backgroundtaskmanagementd trys to register the agent with an invalid uid=-1 or uid: 4294967295(0xFFFFFFFF).
2024-10-02 10:45:33.100537+0200 0x156d4 Activity 0x1b927 88 0 smd: (BackgroundTaskManagement) BTMManager.getEffectiveDisposition
2024-10-02 10:45:33.103478+0200 0x156dd Default 0x1b927 282 0 backgroundtaskmanagementd: [com.apple.backgroundtaskmanagement:main] effectiveItemDisposition: appURL=file:///Applications/Company%20Agent.app/, type=agent, url=Contents/Library/LaunchAgents/com.Company.agent.notifier.plist -- file:///, config={
BTMConfigArguments = (
);
BTMConfigBundleIdentifiers = (
);
BTMConfigExecutablePath = "Contents/Resources/CompanyNotifier.app/Contents/MacOS/CompanyNotifier";
BTMConfigLabel = "com.Company.agent.notifier";
}
2024-10-02 10:45:33.103544+0200 0x156dd Info 0x1b927 282 0 backgroundtaskmanagementd: [com.apple.backgroundtaskmanagement:main] effectiveItemDisposition: result=[disabled, allowed, visible, not notified]
2024-10-02 10:45:33.105120+0200 0x156d4 Default 0x1b927 88 0 smd: (BackgroundTaskManagement) [com.apple.backgroundtaskmanagement:main] getEffectiveDisposition: disposition=[disabled, allowed, visible, not notified], have LWCR=true
2024-10-02 10:45:33.105181+0200 0x156d4 Default 0x0 88 0 smd: [com.apple.xpc.smd:all] Found status: 0 for <private>
2024-10-02 10:45:33.240190+0200 0x154da Default 0x0 88 0 smd: [com.apple.xpc.smd:SMAppServiceFactory] Setting up BundleProgram keys for <private>
2024-10-02 10:45:33.240250+0200 0x154da Default 0x0 88 0 smd: [com.apple.xpc.smd:SMAppServiceFactory] Setting up BundleProgram keys for <private>
2024-10-02 10:45:33.240388+0200 0x154da Activity 0x1b92a 88 0 smd: (BackgroundTaskManagement) BTMManager.registerLaunchItemWithAuditToken
2024-10-02 10:45:33.243990+0200 0x156dd Default 0x1b92a 282 0 backgroundtaskmanagementd: [com.apple.backgroundtaskmanagement:main] registerLaunchItem: pid=3626, uid=-1, type=agent, parentURL=<private>, url=<private>, config=<private>
2024-10-02 10:45:33.244917+0200 0x156dd Default 0x1b92a 282 0 backgroundtaskmanagementd: [com.apple.backgroundtaskmanagement:main] registerLaunchItem: found existing item: uuid=AC0DBC9B-7A16-443E-ABFC-05DF0F534C08, name=CompanyNotifier, type=managed agent, disposition=[disabled, allowed, visible, notified], identifier=com.Company.agent.notifier, url=Contents/Library/LaunchAgents/com.Company.agent.notifier.plist -- file:///
2024-10-02 10:45:33.245238+0200 0x156dd Debug 0x1b92a 282 0 backgroundtaskmanagementd: [com.apple.backgroundtaskmanagement:main] BTMStore: save scheduled.
2024-10-02 10:45:33.245281+0200 0x156dd Debug 0x1b92a 282 0 backgroundtaskmanagementd: [com.apple.backgroundtaskmanagement:main] RecordSet notification scheduled for uid -1
....
2024-10-02 10:45:33.252358+0200 0x154da Error 0x0 88 0 smd: [com.apple.xpc.smd:SMAppService] Unable to submit job: <private> error: Error Domain=OSLaunchdErrorDomain Code=112 UserInfo={NSLocalizedFailureReason=<private>}
2024-10-02 10:45:33.252707+0200 0x156d4 Default 0x1b92a 88 0 smd: [com.apple.xpc.smd:all] Update request for identifier: <private> uid: 4294967295
2024-10-02 10:45:33.253190+0200 0x156dd Default 0x1b92a 282 0 backgroundtaskmanagementd: [com.apple.backgroundtaskmanagement:main] getItemWithIdentifier: identifier=com.Company.agent.notifier, uid=-1
2024-10-02 10:45:33.253759+0200 0x156d4 Error 0x1b92a 88 0 smd: [com.apple.xpc.smd:btm] Error getting BTMItem with Identifier: <private> uid: 4294967295 error: (null)
2024-10-02 10:45:33.253803+0200 0x156d4 Error 0x1b92a 88 0 smd: [com.apple.xpc.smd:all] Unable to find BTMItem for <private> in 4294967295
2024-10-02 10:45:33.253835+0200 0x156d4 Error 0x1b92a 88 0 smd: [com.apple.xpc.smd:all] Update operation returned error: 3, but no reply expected so error will be silent
2024-10-02 10:45:33.661537+0200 0x156dd Debug 0x0 282 0 backgroundtaskmanagementd: [com.apple.backgroundtaskmanagement:main] sending notification for uid -1, type 131080
2024-10-02 10:45:33.665159+0200 0x154fa Info 0x1b853 282 0 backgroundtaskmanagementd: [com.apple.backgroundtaskmanagement:main] fetchSFLItemsMatching: type=managed user item app
2024-10-02 10:45:33.665374+0200 0x154fa Activity 0x15dd3 282 0 backgroundtaskmanagementd: (BackgroundTaskManagement) BTMManager.userDataDidChange
2024-10-02 10:45:33.666041+0200 0x154da Activity 0x1b92d 88 0 smd: (BackgroundTaskManagement) BTMManager.userDataDidChange
2024-10-02 10:45:33.666651+0200 0x154fa Debug 0x15dd3 282 0 backgroundtaskmanagementd: (BackgroundTaskManagement) [com.apple.backgroundtaskmanagement:main] -[BTMManager handleUserDataDidChangeNotification:]: uid=-1, type=131080
2024-10-02 10:45:33.666085+0200 0x154da Debug 0x1b92d 88 0 smd: (BackgroundTaskManagement) [com.apple.backgroundtaskmanagement:main] -[BTMManager handleUserDataDidChangeNotification:]: uid=-1, type=131080
2024-10-02 10:45:36.218160+0200 0x154fa Debug 0x0 282 0 backgroundtaskmanagementd: [com.apple.backgroundtaskmanagement:main] -[BTMStore handleWriteTimer] entered
2024-10-02 10:45:36.218254+0200 0x154fa Debug 0x0 282 0 backgroundtaskmanagementd: [com.apple.backgroundtaskmanagement:main] -[BTMStore _save] entered
2024-10-02 10:45:36.224738+0200 0x154fa Default 0x0 282 0 backgroundtaskmanagementd: [com.apple.backgroundtaskmanagement:main] BTMStore: store saved to /var/db/com.apple.backgroundtaskmanagement/BackgroundItems-v9.btm
Could it be a problem from the MDM system JamfNow or somewhere else?
The whole logs is as attached.
Thanks!
Opening a fresh post as the other seem old/abandoned. I’m trying to add a fail-safe URLprobe to DNS setting profile (DNS over http) for the case that the iPhone/iPad connects to a wifi hotspot with captive portal without internet access. I use OnDemandRules to circumvent known problematic SSID names a specific (wildcard) domains - both working just fine and the requests are falling-back to a system resolver for such a requests.
I’ve added a URLStringProbe which supposed to check availability of the internet.
The probe should trigger on 200 OK response code and use the DNSSettings or fallback to a system resolver in the case of any other outcome, according to the documentation:
A URL to probe. If this URL is successfully fetched (returning a 200 HTTP status code) without redirection, this rule matches.
https://developer.apple.com/documentation/devicemanagement/dnssettings/ondemandruleselement
https://developer.apple.com/business/documentation/Configuration-Profile-Reference.pdf
Tested on iPhone 14 (iOS 18.1) but it doesn’t work. I’m using Clouflare https://1.1.1.1/index.html for the sake of simplicity and do some adjustment in IP/path for testing purposes
using https to enforce TLS (to avoid hijack/MitM from a captive portal)
using a direct IP (in this case Cloudflare) so I don't need to resolve a domain to execute the probe itself
Anyway, I’ve changed the URL for a testing purposes to return either 404, redirect or timeout and in all cases cases the probe acts the same way like for 200 OK response.
My expectation is that probe should test negative and go to next rule which is
<key>Action</key>
<string>Disconnect</string>
and thus use the system resolver which will allow the system to detect a captive portal and display sign-in popup to the captive portal
Any idea where might be the issue?
Example 1 - with all rules
<key>DNSSettings</key>
<dict>
<key>DNSProtocol</key>
<string>HTTPS</string>
<key>ServerURL</key>
<string>https://dnsserverexample.com/v1/something/id/dns-query</string>
<key>ServerAddresses</key>
<array/>
<key>SupplementalMatchDomains</key>
<array/>
</dict>
<key>ProhibitDisablement</key>
<true/>
<key>OnDemandRules</key>
<array>
<dict>
<key>Action</key>
<string>Disconnect</string>
<key>SSIDMatch</key>
<array>
<string>whitelistedSSID1</string>
<string>whitelistedSSID1</string>
</array>
</dict>
<dict>
<key>Action</key>
<string>EvaluateConnection</string>
<key>ActionParameters</key>
<array>
<dict>
<key>DomainAction</key>
<string>NeverConnect</string>
<key>Domains</key>
<array>
<string>*.whitelisteddomainexample.com</string>
<string>*.whitelisteddomainexample2.com</string>
</array>
</dict>
</array>
</dict>
<dict>
<key>URLStringProbe</key>
<string>https://1.1.1.1/index.html</string>
<key>Action</key>
<string>Connect</string>
</dict>
<dict>
<key>Action</key>
<string>Disconnect</string>
</dict>
</array>
</dict>
Example 2 - just URL probe and fail-open for iphone
<key>DNSSettings</key>
<dict>
<key>DNSProtocol</key>
<string>HTTPS</string>
<key>ServerURL</key>
<string>https://dnsserverexample.com/v1/something/id/dns-query</string>
<key>ServerAddresses</key>
<array/>
<key>SupplementalMatchDomains</key>
<array/>
</dict>
<key>ProhibitDisablement</key>
<true/>
<key>OnDemandRules</key>
<array>
<dict>
<key>URLStringProbe</key>
<string>https://1.1.1.1/index.html</string>
<key>Action</key>
<string>Connect</string>
</dict>
<dict>
<key>Action</key>
<string>Disconnect</string>
</dict>
</array>
Also I’ve tried to debug similar issue in the past on MacOS. I’ve tried to add debug profiles NetworkDiagnostic.mobileconfig and mDNSResponder.mobileconfig but I don't see any logs related to OnDemandRules processing - any clue how to get some insight into the rules processing/evaluation?
I would like to contact about an issue with the iOS 18 update.
With the release of the new iPhone 16, camera controls have been added.
however, when using MDM, there is an issue where the camera control button settings change after blocking and unblocking the camera.
1. If the camera control button is originally set to 'Camera', when you block and unblock the camera through MDM, the button setting changes to 'None'.
Shouldn't the camera control settings be maintained even after blocking and unblocking the camera?
If this is a known issue, can you tell me when it will be fixed and updated?
The original text is in Chinese, and below is the content translated using OpenAI.
問題描述:
因為一些因素,所以公司申請了兩個企業憑證,其中Entity Name一樣,但Team ID不一樣。現在發現iPhone16系列裝置的使用者,無法同時使用兩個憑證打包出來的APP,不是都會閃退就是其中一個會閃退。
重現問題的逐步說明:
測試的情況有兩種:
從iPhone16之前的裝置轉移資料到iPhone16,這兩個APP打開都會閃退
直接在iPhone16安裝這兩個APP,則第一個安裝的APP可以正常使用,第二個安裝的APP會閃退。如果想要切換能使用的APP,需要到 一般-VPN與裝置管理-INNOLUX CORPORATION ,點擊”刪除App”,然後更換安裝順序。
如果是舊裝置升級到iOS 18,則不會有該問題
期望的結果:
兩個APP都能正常使用
實際看到的結果:
如果是舊裝置移轉資料到iPhone16,則都會閃退:如果是直接在iPhone16安裝這兩個APP,則第一個安裝的APP可以正常使用,第二個安裝的APP會閃退。
OpenAI Translation:
Problem Description: Due to certain factors, the company applied for two enterprise certificates, which have the same Entity Name but different Team IDs. It has now been discovered that users of the iPhone 16 series devices are unable to use apps packaged with both certificates simultaneously; either both apps crash or one of them crashes.
Step-by-Step Reproduction of the Issue:
There are two testing scenarios:
Transferring data from a device prior to the iPhone 16 to the iPhone 16 results in both apps crashing upon opening.
Directly installing both apps on the iPhone 16 allows the first installed app to function normally, while the second installed app crashes. To switch to the functioning app, one must go to Settings - VPN & Device Management - INNOLUX CORPORATION, click "Delete App," and then change the installation order.
If an older device is upgraded to iOS 18, this issue does not occur.
Expected Result: Both apps should function normally.
Actual Observed Result: If data is transferred from an older device to the iPhone 16, both apps crash. If both apps are directly installed on the iPhone 16, the first installed app works normally while the second installed app crashes.
Hello team! I am trying to update an app via MDM on macOS sequoia. It has always worked fine for me since macOS 13. But now I get this error in the console when trying to update the app:
Preflight canceled with coordinator: (null) error: Error Domain=ASDErrorDomain Code=663 "The app is running and we don't have the context to quit it, failing install." UserInfo={NSDebugDescription=The app is running and we don't have the context to quit it, failing install.}
Always updated even if the app was open without problems before macOS 15.
Regards
Importing an existing self- signed trusted root certificate no longer triggers option to trust cert in Settings / About / Certificate Trust Settings In iOS 18.
Cert installed manually from internal website, as email attachment, and using profile in Configurator all produce same result.
Same cert and processes work on iOS 16.7.10, iOS 17.6.1 and iPadOS 18.0
But not on iOS 18.0 nor beta iOS 18.1 beta5 on iPhone 16
Also tried regening a new test root on macOS Sonoma and installing using Configurator. No difference.
It’s broken - I’ve reported it by Feedback - it’s a vital security flaw.
Anyone else see this or have a workaround?
With iPhone 16, there is Camera Control page when setting up a phone.
In https://developer.apple.com/documentation/devicemanagement/skipkeys?language=objc, there is listed skip keys for different setup pages, but there is no mention of Camera Control.
Is there skip key for Camera Control? If there is, what is it?
So I'm tryin to install an blank application on my device but It doesn't show on the Run on Target in Xcode, but when I look at manage run destination it shows my device?
I was able to successfully pass a PAT token challenge with my iPhone in iOS 18. However, after installing a corporate profile via Google Device Policy, it no longer passes the challenge. Is this expected? I.e. does Apple consider a device with a profile to be less secure than one without it?