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.
Generate Configuration Profiles
Section titled “Generate Configuration Profiles”-
Generate unsigned profiles
Terminal window ./mscp.py guidance custom/baselines/BASELINE_NAME.yaml -pExample:
Terminal window ./mscp.py guidance custom/baselines/800-53r5_moderate_macos_26.0.yaml -p -
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)
- …
-
Generate unsigned profiles
Terminal window ./scripts/generate_guidance.py -p baselines/BASELINE_NAME.yamlExample:
Terminal window ./scripts/generate_guidance.py -p baselines/800-53r5_moderate.yaml -
Find your files
Profiles are saved to
build/BASELINE_NAME/mobileconfigs/:Directorybuild/
Directory800-53r5_moderate/
Directorymobileconfigs/
Directoryunsigned/ Unsigned profiles (.mobileconfig)
- …
Directorypreferences/ Preference plists (.plist)
- …
Generate Signed Profiles
Section titled “Generate Signed 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:
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):
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
./mscp.py guidance custom/baselines/BASELINE_NAME.yaml -p -H SUBJECT_KEY_IDExample:
./mscp.py guidance custom/baselines/800-53r5_moderate_macos_26.0.yaml -p -H ABC123DEF456./scripts/generate_guidance.py -p -H SUBJECT_KEY_ID baselines/BASELINE_NAME.yamlExample:
./scripts/generate_guidance.py -p -H ABC123DEF456 baselines/800-53r5_moderate.yamlStep 3: Find your signed files
Directorybuild/
DirectoryBASELINE_NAME/
Directorymobileconfigs/
Directoryunsigned/ Unsigned profiles
- …
Directorysigned/ Signed profiles
- …
Directorypreferences/ Preference plists
- …
Command Reference
Section titled “Command Reference”| Flag | Description |
|---|---|
-p | Generate individual profiles (one per payload type) |
--consolidated-profile | Generate a single consolidated profile |
--granular-profiles | Generate granular profiles |
-H HASH | Sign profiles with your certificate’s Subject Key ID |
| Flag | Description |
|---|---|
-p | Generate individual profiles (one per payload type) |
-P | Generate a single consolidated profile |
-H HASH | Sign profiles with your certificate’s Subject Key ID |
Individual vs Consolidated Profiles
Section titled “Individual vs Consolidated Profiles”| Type | Flag | Best For |
|---|---|---|
| Individual | -p | Flexibility — deploy only the profiles you need |
| Consolidated | --consolidated-profile | Simplicity — one profile with all settings |
| Granular | --granular-profiles | Fine-grained control per payload |
| Type | Flag | Best For |
|---|---|---|
| Individual | -p | Flexibility — deploy only the profiles you need |
| Consolidated | -P | Simplicity — one profile with all settings |
Most organizations prefer individual profiles (-p) for easier management and troubleshooting.
Next Steps
Section titled “Next Steps”- Configuration Profile Layout — Understand the file structure
- How to Generate Guidance — Generate all outputs at once