Easily allow your users to opt-in / opt-out of your internal beta test program via Jamf Pro’s Self Service
Background
After watching the JNUC 2022 Invitation-only Betas presentation, @slippery asked for “the ‘new’ EA read method” for opting-in / opting-out via Self Service.
Hopefully the following will prove helpful.
Configuration
Complete the following configuration steps in your Jamf Pro server:
Extension Attribute
Testing Level Plist
- Download the Testing-Level-Plist.xml
- Upload the downloaded Computer Extension Attribute
- Modify
filepath
to match the Reverse Domain Name Notation for your organization (i.e.,org.churchofjesuschrist
) - Click Save
Smart Groups
The following Smart Group examples include criteria for both the API and the non-API methods; feel free to use one or both.
Testing: None
AND / OR | CRITERIA | OPERATOR | VALUE | ||
---|---|---|---|---|---|
( | Testing Level | is | |||
or | Testing Level | is |
| ) | |
and | Testing Level Plist | is |
|
Testing: Gamma Group
AND / OR | CRITERIA | OPERATOR | VALUE | ||
---|---|---|---|---|---|
Testing Level | is | Gamma | |||
or | Testing Level Plist | is |
|
Scripts
Property List Writer
- Download Property-List-Writer.sh
- Add the downloaded Script to Jamf Pro
- Modify
filepath
to match the Reverse Domain Name Notation for your organization (i.e.,org.churchofjesuschrist
) - Click the Options tab and configure the Parameter Labels as follows:
- Parameter 4:
Key (i.e., Name of the "key" for which the value will be set)
- Parameter 5:
Value (i.e., The value to which "key" will be set)
- Parameter 4:
- Click Save
Display Message via swiftDialog
- Download Display-Message-via-Dialog.bash
- Add the downloaded Script to Jamf Pro
- Modify the Parameter Labels
- Click Save
Policies
Opt-in Beta Test Program (sans API)
Options
General
- Display Name: Opt-in Beta Test Program (sans API)
- Execution Frequency: Ongoing
Scripts
Display-Message-via-Dialog.bash
- Title:
Workforce macOS Beta Test Program
- Message:
**First, thank you for being an opt-in macOS Beta Tester.** We could not complete a critical part of our jobs without you. \n\nOpt-in Beta Testers help secure the Church Workforce who prefer macOS. \n\nPlease click **Open** and join the private macOS Beta Testers team in Microsoft Teams.
- Icon:
https://ics.services.jamfcloud.com/icon/hash_634adcd494365740cad75bda5359b420a40aaeae5086d310608d710087a6353f
- Button 1 Text:
Open
- Button 2 Text:
Close
- Info Button Text:
KB8675309
- Extra Flags:
--iconsize 110 --timer 120 --quitoninfo --ignorednd --small --moveable --position topright --ontop
- Action:
https://teams.microsoft.com/l/message/really_long_URL_goes_here
Property-List-Writer.sh
- Key:
Testing Level
- Value:
Gamma
Maintenance
- Update Inventory
Files and Processes
- Execute Command:
/usr/bin/su - "/usr/bin/stat -f%Su /dev/console" -c "/usr/bin/osascript -e 'tell application \"Self Service\" to activate' -e 'tell application \"System Events\" to key code 53' -e 'tell application \"System Events\" to keystroke \"r\" using {command down}'"
Scope
- Target:
All Jamf Pro Compliant Computers
- Limitations:
None
- Exclusions:
Testing: Alpha Group
Testing: Beta Group
Testing: Gamma Group
Self Service
- Self Service Display Name:
Opt-in Beta Test Program (sans API)
- Button Name Before Initiation:
Opt-in
- Button Name After Initiation:
Opt-in
- Description:
**First, thank you for being an opt-in macOS Beta Tester.** We could not complete a critical part of our jobs without you. \n\nOpt-in Beta Testers help secure the Church Workforce who prefer macOS.
Opt-out Beta Test Program (sans API)
Options
General
- Display Name: Opt-out Beta Test Program (sans API)
- Execution Frequency: Ongoing
Scripts
Property-List-Writer.sh
- Key:
Testing Level
- Value:
None
Maintenance
- Update Inventory
Files and Processes
- Execute Command:
/System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil unenroll ; /usr/sbin/pkgutil --forget com.apple.pkg.macOSCustomerBetaAccessUtility.16U2035 ; /usr/bin/su - "
/usr/bin/stat -f%Su /dev/console
" -c "/usr/bin/osascript -e 'tell application \"Self Service\" to activate' -e 'tell application \"System Events\" to key code 53' -e 'tell application \"System Events\" to keystroke \"r\" using {command down}'"
Scope
- Target:
Testing: Alpha Group
Testing: Beta Group
Testing: Gamma Group
- Limitations:
None
- Exclusions:
None
Self Service
- Self Service Display Name:
Opt-out Beta Test Program (sans API)
- Button Name Before Initiation:
Opt-out
- Button Name After Initiation:
Opt-
out - Description:
We're sorry to see you go. Click **Opt-out** to remove _this computer_ from the beta testing program. (You can opt-in again at any time.)