Grant temporary admin rights to macOS users using Workspace ONE UEM and a dummy app deployment — no scripting required.
This workflow enables macOS users to be granted temporary administrator access using Workspace ONE UEM. It uses a dummy .pkg
file that installs no actual software but contains a postinstall script that adds the current console user to the admin
group.
The process is managed entirely through the Workspace ONE console — no external scripts, APIs, or custom workflows are required.
- Workspace ONE UEM Console access
- macOS devices enrolled via DEP or MDM
- Download the Packages App by WhiteBox
(This is the latest developer build with bug fixes; mount and install the
.dmg
after download) - Workspace ONE Admin access to create Smart Groups and Internal Apps
We are going to use a dummy package to deliver post-install and post-uninstall scripts.
Use the Packages App to create this.
- Open Packages App. Pick Raw Package and click Next
- Give it a name. (Example:
macOS Admin Elevation
) - Go to the Build menu, and click Build
- Your package will be in the project directory under
/build
- Use the Workspace ONE Admin Assistant Tool to create the Plist for uploading to the UEM console.
Create a Smart Group that will control which devices receive the elevated rights package.
Steps:
- In the Workspace ONE Console, go to:
Groups & Settings > Groups > Assignment Groups - Click Add Smart Group
- Name the group (e.g.,
macOS Admin Elevation
) - Configure assignment logic:
- Manually assign devices
- Or use a Tag (e.g.,
MacOS Admin Elevation
) for dynamic membership
✅ Any device added to this Smart Group will receive the app and be granted admin rights.
Upload the .pkg
to Workspace ONE as an Internal App.
Steps:
- In the Workspace ONE Console, go to:
Apps > Native > Internal > Add Application - Upload the file:
macOS Admin Elevation.pkg
- Upload the Plist created by the Workspace ONE Admin Assistant tool
- Set the Post-Install Script and Post-Uninstall Script as shown below
- (Optional) Give it an icon
- Click Save & Assign
- Click Add Assignment
- Assign to the Smart Group from Step 2.
You can use Auto or On-Demand assignment - Click Add, then Save & Publish
#!/bin/bash
loggedInUser=`/usr/bin/stat -f%Su /dev/console`
if [ "$CurrentUser" == "root" ] || [ "$CurrentUser" == "_mbsetupuser" ]; then
exit 0
fi
#adds user to admin group (post-install)
dseditgroup -o edit -a "$loggedInUser" -t user admin
#!/bin/bash
loggedInUser=`/usr/bin/stat -f%Su /dev/console`
if [ "$CurrentUser" == "root" ] || [ "$CurrentUser" == "_mbsetupuser" ]; then
exit 0
fi
#removes user from the admin group (post-uninstall)
dseditgroup -o edit -d "$loggedInUser" -t user admin
To revoke admin rights:
- Remove the device from the Smart Group
(e.g., delete themacOS Admin Elevation
tag) - Workspace ONE will uninstall the dummy package
MIT License – see LICENSE for full details.