Menu Close

Your Internal Beta Test Program: Opt-in / Opt-out via Self Service (sans Jamf Pro API)

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:

  1. Extension Attribute
  2. Smart Groups
  3. Scripts
  4. Policies

Extension Attribute

Testing Level Plist

  1. Download the Testing-Level-Plist.xml
  2. Upload the downloaded Computer Extension Attribute
  3. Modify filepath to match the Reverse Domain Name Notation for your organization (i.e., org.churchofjesuschrist)
  4. 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 / ORCRITERIAOPERATORVALUE
(Testing Levelis
orTesting LevelisNone)
andTesting Level PlistisNone

Testing: Gamma Group

AND / ORCRITERIAOPERATORVALUE
Testing LevelisGamma
orTesting Level PlistisGamma

Scripts

Property List Writer

  1. Download Property-List-Writer.sh
  2. Add the downloaded Script to Jamf Pro
  3. Modify filepath to match the Reverse Domain Name Notation for your organization (i.e., org.churchofjesuschrist)
  4. 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)
  5. Click Save

Display Message via swiftDialog

  1. Download Display-Message-via-Dialog.bash
  2. Add the downloaded Script to Jamf Pro
  3. Modify the Parameter Labels
  4. 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.)
Posted in Extension Attributes, Jamf Pro, Scripts, Tips & Tricks

Related Posts