Skip to content

How to Generate Configuration Profiles

Configuration profiles are generated as part of the guidance output using the -p flag. The script reads your baseline and creates .mobileconfig files ready for MDM deployment.


  1. Generate unsigned profiles

    Terminal window
    ./mscp.py guidance custom/baselines/BASELINE_NAME.yaml -p

    Example:

    Terminal window
    ./mscp.py guidance custom/baselines/800-53r5_moderate_macos_26.0.yaml -p
  2. Find your files

    Profiles are saved to build/BASELINE_NAME/mobileconfigs/:

    • Directorybuild/
      • Directory800-53r5_moderate_macos_26.0/
        • Directorymobileconfigs/
          • Directoryunsigned/ Unsigned profiles (.mobileconfig)
          • Directorypreferences/ Preference plists (.plist)
          • Directorygranular/ Granular profiles (if —granular-profiles)

Signed profiles verify authenticity and prevent tampering. You need a signing certificate installed in your keychain.

Step 1: Get your certificate’s Subject Key ID

First, find the offset:

Terminal window
security find-certificate -c "Your Certificate Name" -p | \
openssl asn1parse | \
awk -F: '/X509v3 Subject Key Identifier/ {getline; print $1}'

Then extract the hash using that offset (replace OFFSET with the number from above):

Terminal window
security find-certificate -c "Your Certificate Name" -p | \
openssl asn1parse -strparse OFFSET | \
awk -F: '/HEX DUMP/{print $4}'

Replace "Your Certificate Name" with your signing certificate’s common name.

Step 2: Generate signed profiles

Terminal window
./mscp.py guidance custom/baselines/BASELINE_NAME.yaml -p -H SUBJECT_KEY_ID

Example:

Terminal window
./mscp.py guidance custom/baselines/800-53r5_moderate_macos_26.0.yaml -p -H ABC123DEF456

Step 3: Find your signed files

  • Directorybuild/
    • DirectoryBASELINE_NAME/
      • Directorymobileconfigs/
        • Directoryunsigned/ Unsigned profiles
        • Directorysigned/ Signed profiles
        • Directorypreferences/ Preference plists

FlagDescription
-pGenerate individual profiles (one per payload type)
--consolidated-profileGenerate a single consolidated profile
--granular-profilesGenerate granular profiles
-H HASHSign profiles with your certificate’s Subject Key ID

TypeFlagBest For
Individual-pFlexibility — deploy only the profiles you need
Consolidated--consolidated-profileSimplicity — one profile with all settings
Granular--granular-profilesFine-grained control per payload

Most organizations prefer individual profiles (-p) for easier management and troubleshooting.