Edit User Profile - Rocketman-Tech/rcc GitHub Wiki
The Edit User Profile tool facilitates user input for a range of account and device details based on the information available in Jamf Pro. This tool simplifies the configuration process by presenting users with a dialog box to make their selections.
Users can supply:
- User Name
- Full Name
- E‑Mail
- Computer Name
- Asset Tag
- Room
- Position
- Building
- Department
All inputs are collected via a single dialog and then updated in Jamf Pro.
Quick Start
To launch the tool and prompt for all fields, including support‑team name and custom window sizing:
Example Command
sudo rocketman EditUserProfile \
--clientId "YOUR_CLIENT_ID" \
--clientSecret "YOUR_CLIENT_SECRET" \
--description "Please fill out the form below in order for IT to provide you with the applications and configurations you need.\n\nIf you need help, contact your hiring manager." \
--title " " \
--width 1000
This command will:
- Retrieve available buildings and/or departments from Jamf Pro using the provided API credentials.
- Display a dialog box prompting the user for all fields.
- Define a description.
- Clear out the title field so the default banner can stand by itself.
- Set width to 1000 for more breathing room.
- Update the user's information in Jamf Pro.
Command Options
Required Parameters
--clientId [string]
Specifies the Jamf API Client ID for authentication.
- Type: string
- Required: Yes
- Example:
--clientId "YOUR_CLIENT_ID"
--clientSecret [string]
Specifies the Jamf API Client Secret for authentication.
- Type: string
- Required: Yes
- Example:
--clientSecret "YOUR_CLIENT_SECRET"
Optional Parameters
--domain [string]
Defines the domain for options set in local or managed plists.
- Type: string
- Default:
tech.rocketman.edituserprofile
- Example:
--domain "custom.domain.selectTool"
--requiredFields [string]
Specifies a space-separated list of fields that must be completed in the dialog.
-
Type: string (space-separated)
-
Required: No
-
Options:
username
,fullname
,email
,room
,position
,building
,department
,computername
,assettag
-
Example:
--requiredFields username fullname email
--disableFields [string]
Specifies a space-separated list of fields that will not be shown in the dialog.
-
Type: string (space-separated)
-
Required: No
-
Options:
username
,fullname
,email
,room
,position
,building
,department
,computername
,assettag
-
Example:
--disableFields assettag department
--phone [string]
Provides a default phone number to pre-populate the Phone field and to be referenced in your custom text via the %=
variables.
- Type: string
- Required: No
- Example:
--phone "+1-555-123-4567"
-
Usage in templates: you can reference this value in
--description
(or title, etc.) using the placeholder%=PHONE%
.--description "Need help? Call us at %=PHONE%."
--email [string]
Provides a default email address to pre-populate the E-Mail field and to be referenced in your custom text via the %=
variables.
-
Type: string
-
Required: No
-
Example:
--email "[email protected]"
-
Usage in templates: you can reference this value in
--description
(or title, etc.) using the placeholder%=EMAIL%
.--description "Questions? Email us at %=EMAIL%."
--logo [path]
Specifies the file path to a logo to display in the dialog.
- Type: string
- Default: None
- Example:
--logo /path/to/logo.png
--backgroundImage [string]
Specifies the file path to an image to display in the header
- Type: string
- Required: No
- Example:
--backgroundImage "/path/to/background.png"
--supportTeamName [string]
Specifies the name of the support team for use in the default description template (see defaults for --description
).
-
Type: string
-
Required: No (only needed if you rely on the default
--description
) -
Example:
--supportTeamName "IT Support"
--title [string]
Sets the title of the dialog window. If omitted, defaults to:
Happy %=WEEKDAY%!, %=LOCALUSERNAME%!
Welcome to your new %=MODEL%
-
Type: string
-
Default: the template shown above
-
Example:
--title "Welcome to your new %=MODEL%!"
--description [string]
Defines the description text displayed in the dialog. If omitted, defaults to:
Please enter the **required** (\*) information for your %=MODEL%, then click
**Continue** to start applying settings to your new Mac.
If you need assistance, please contact the **%=SUPPORTTEAM%**.
-
Type: string
-
Default: the template shown above (requires
--supportTeamName
to populate%=SUPPORTTEAM%
if--description
is omitted) -
Example:
--description "Please fill out the form below in order for IT to provide you with the applications and configurations you need.\n\nIf you need help, contact your hiring manager."
--width [string]
Specifies the width of the dialog box.
- Type: string
- Default:
750
- Example:
--width 800
--height [string]
Specifies the height of the dialog box.
- Type: string
- Default:
720
- Example:
--height 500
--dialogArgs [ARGS...]
Passes any additional raw arguments directly through to SwiftDialog. Use this to leverage custom SwiftDialog flags or options not otherwise exposed by this tool.
-
Type: array of strings
-
Required: No
-
Example:
--dialogArgs --button1text "Continue" --icon "/path/to/icon.icns"
--simulate
Enables simulation mode, which prevents sending updates to Jamf Pro.
- Type: flag
- Default: False
- Example:
--simulate
Required API Permissions
The Jamf Pro API Roles and Clients used with Update User Info must have the following permissions to ensure proper functionality:
- Read Buildings
- Read Departments
- Read Computers
Ensure that these permissions are assigned to your API client configuration in Jamf Pro prior to executing the tool.
Advanced Usage Example
To create a fully customized dialog box for building and department selection, including logo and window size adjustments:
sudo rocketman -l DEBUG EditUserProfile \
--clientId "YOUR_CLIENT_ID" \
--clientSecret "YOUR_CLIENT_SECRET" \
--requiredFields username fullname email building department \
--disableFields assettag \
--phone "+1-555-123-4567" \
--email "[email protected]" \
--supportTeamName "IT Support" \
--description "Welcome aboard! Please complete the **required** fields below to help us set up your account and hardware.\n\nIf you encounter any issues, reach out to the IT Support team.\n\nPhone: %=PHONE%\n\nEmail: %=EMAIL%" \
--title "🚀 Rocketman Tech Profile Setup" \
--width 800 \
--height 700
Important Notes
- Simulation Mode: Use
--simulate
for testing the dialog configuration without affecting Jamf Pro data.