Hey all! this may sounds like a dumb question, I a...
# fleet
b
Hey all! this may sounds like a dumb question, I am new to this, but I am wondering how one would configure a default admin user via Automatic Device Enrollment (DEP)? I have a JSON file setup by following these steps: https://fleetdm.com/guides/macos-setup-experience#macos-setup-assistant and the further documentation from apple here: https://developer.apple.com/documentation/devicemanagement/profile I have this working and it is deploying to the new workstations.
Copy code
{
  "profile_name": "Enrollment Profile",
  "allow_pairing": false,
  "is_mdm_removable": true,
  "is_mandatory": true,
  "is_multi_user": false,
  "org_magic": "1",
  "language": "en",
  "region": "US",
  "skip_setup_items": [
    "AppleID",
    "AppStore",
    "Diagnostics",
    "EnableLockdownMode",
    "FileVault",
    "iCloudDiagnostics",
    "iCloudStorage",
    "Intelligence",
    "Location",
    "Payment",
    "Privacy",
    "Restore",
    "ScreenTime",
    "Siri",
    "TermsOfAddress",
    "TOS",
    "UnlockWithWatch"
  ],
  "support_email_address": "email@email.com",
  "await_device_configured": true
}
but I'm wondering how would would run DEP commands, such as ones listed here: https://developer.apple.com/documentation/devicemanagement/accountconfigurationcommand/command https://developer.apple.com/documentation/devicemanagement/account_configuration The main goal of this would be to not allow users to be admins and force the
setPrimarySetupAccountAsRegularUser
key to true
d
b
Thanks @Dale Ribeiro. I guess my question is, how do I deploy these commands as part of the setup experience for fleet? I have a XML command file written that should do everything I want, I just don't know how to incorporate it. For example, if I try to use the xml example plist in the 2nd link you sent, that file cannot be uploaded directly to the Custom Settings page as it is not properly formatted.
d
Ah, got it. If I were building this, I think I'd do something like this: • In the Fleet UI, go to Controls > Setup experience > Setup assistant > Show advanced options > the box for Release device manually. This will let you send MDM commands to the device before it proceeds through the setup assistant. • Use the Fleet API to send the Account Configuration MDM command with this endpoint: https://fleetdm.com/docs/rest-api/rest-api#run-mdm-command • After that command is delivered, release the device from configuration using Release Device from Await Configuration an MDM command. Use the same Fleet run MDM command endpoint to deliver this to the host
^ This is kind of a proof of concept to see if those actions result in the desired state. If that works, I'd look into automating the process with something like Tines to generate the MDM commands and send them at the appropriate time after a device enrolls into MDM
b
Got it, this is gonna be a much more complex setup than I had hoped for. Is there any plans to integrate commands into the Fleet portal and not just the API in the future? Been trying to keep this entire process self hosted and signing up for additional providers is gonna make that messy
Actually I'm thinking about this. If I execute this command via the command line tool would it run during the initial setup of a freshly wiped machine that is enrolled in Apple Business Manager?
Hmm so the command line tool doesn't return a UUID if the machine has been added to ABM but not turned online yet so, I think you are right, this might require an automation platform in the current state
I appreciate the help on this @Dale Ribeiro! I'll try to figure out how best to proceed from here
@Dale Ribeiro I realized that Tines has a self hosted deployment option so I'm looking into that. Does Fleet have a way to send a webhook request to Tines when a new device is enrolled? Or do I need to have Tines request new devices from Fleet periodically until it finds that a new one has enrolled?
Sorry I found the documentation on it. https://fleetdm.com/guides/automations Reading through it now
d
Hey @Billy H, yep that's the article I was looking for! There's a global activities webhook that'll fire off for device enrollments
Sending this as well in case you haven't come across it yet: https://fleetdm.com/guides/building-webhook-flows-with-fleet-and-tines
b
Thanks @Dale Ribeiro! So actually this is something I meant to reach out to support about, I don't seem to be able to see the Activities page that is described here: https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Audit-logs.md I am a full admin in Fleet so I don't think it's a permissions issue
d
What version of Fleet are you running? The activities feed should be available to the right side of the main dashboard after you log in. Automations was added in 4.51
b
Oh man I feel really dumb... I guess I was expecting it to be a tab. Welp thanks for pointing it out haha thanks!
d
No problem! 😄