Home > Jamf Pro, Jamf Pro API, Jamf Pro Classic API, Mac administration, macOS > Building Jamf Pro smart groups for Sequoia-compatible and Sequoia-incompatible Mac models

Building Jamf Pro smart groups for Sequoia-compatible and Sequoia-incompatible Mac models

As part of preparing for macOS Sequoia, it may be useful to have a way to easily distinguish between the Macs in your fleet which can run macOS Sequoia and those which can’t. Apple has published the following list of Macs which are compatible with Sequoia, which will help with both identifying the compatible Mac models as well as the incompatible Mac models. 

  • iMac: 2019 and later models
  • iMac Pro: All models
  • Mac Studio: All models
  • MacBook Pro: 2018 and later models
  • MacBook Air: 2020 and later models
  • Mac Mini: 2018 and later models
  • Mac Pro: 2019 and later models

From there, here’s the list of Mac models which are compatible with macOS Sequoia:


Mac13,1
Mac13,2
Mac14,10
Mac14,12
Mac14,13
Mac14,14
Mac14,15
Mac14,2
Mac14,3
Mac14,5
Mac14,6
Mac14,7
Mac14,8
Mac14,9
Mac15,10
Mac15,11
Mac15,12
Mac15,13
Mac15,3
Mac15,4
Mac15,5
Mac15,6
Mac15,7
Mac15,8
Mac15,9
MacBookAir10,1
MacBookAir9,1
MacBookPro15,1
MacBookPro15,2
MacBookPro15,3
MacBookPro15,4
MacBookPro16,1
MacBookPro16,2
MacBookPro16,3
MacBookPro16,4
MacBookPro17,1
MacBookPro18,1
MacBookPro18,2
MacBookPro18,3
MacBookPro18,4
MacPro7,1
Macmini8,1
Macmini9,1
VirtualMac2,1
iMac19,1
iMac19,2
iMac20,1
iMac20,2
iMac21,1
iMac21,2
iMacPro1,1

 

We can use this information to build smart groups which can help identify which Macs are compatible with Sequoia and which are not. For more details, see below the jump:

 

 

Using the information mentioned above, I was able to build two smart groups, one which displays compatible Macs and the other which displays incompatible Macs.

 

The compatible Macs’ smart group checks for if the Mac in question’s model identifier is any of the model identifiers which are compatible with Sequoia:

 


<?xml version="1.0" encoding="UTF-8"?>
<computer_group>
<name>Macs compatible with macOS Sequoia</name>
<is_smart>true</is_smart>
<criteria>
<size>51</size>
<criterion>
<name>Model Identifier</name>
<priority>0</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac13,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>1</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac13,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>2</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac14,10</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>3</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac14,12</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>4</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac14,13</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>5</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac14,14</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>6</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac14,15</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>7</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac14,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>8</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac14,3</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>9</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac14,5</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>10</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac14,6</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>11</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac14,7</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>12</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac14,8</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>13</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac14,9</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>14</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac15,10</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>15</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac15,11</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>16</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac15,12</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>17</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac15,13</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>18</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac15,3</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>19</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac15,4</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>20</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac15,5</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>21</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac15,6</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>22</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac15,7</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>23</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac15,8</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>24</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Mac15,9</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>25</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookAir10,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>26</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookAir9,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>27</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro15,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>28</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro15,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>29</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro15,3</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>30</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro15,4</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>31</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro16,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>32</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro16,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>33</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro16,3</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>34</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro16,4</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>35</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro17,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>36</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro18,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>37</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro18,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>38</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro18,3</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>39</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro18,4</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>40</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacPro7,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>41</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Macmini8,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>42</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Macmini9,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>43</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>VirtualMac2,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>44</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>iMac19,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>45</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>iMac19,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>46</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>iMac20,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>47</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>iMac20,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>48</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>iMac21,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>49</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>iMac21,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>50</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>iMacPro1,1</value>
</criterion>
</criteria>
<computers/>
</computer_group>

 

The incompatible Macs’ smart group checks for if the Mac in question’s model identifier is not any of the model identifiers which are compatible with Sequoia:

 


<?xml version="1.0" encoding="UTF-8"?>
<computer_group>
<name>Macs incompatible with macOS Sequoia</name>
<is_smart>true</is_smart>
<criteria>
<size>51</size>
<criterion>
<name>Model Identifier</name>
<priority>0</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac13,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>1</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac13,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>2</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac14,10</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>3</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac14,12</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>4</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac14,13</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>5</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac14,14</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>6</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac14,15</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>7</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac14,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>8</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac14,3</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>9</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac14,5</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>10</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac14,6</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>11</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac14,7</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>12</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac14,8</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>13</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac14,9</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>14</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac15,10</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>15</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac15,11</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>16</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac15,12</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>17</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac15,13</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>18</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac15,3</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>19</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac15,4</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>20</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac15,5</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>21</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac15,6</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>22</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac15,7</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>23</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac15,8</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>24</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Mac15,9</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>25</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>MacBookAir10,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>26</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>MacBookAir9,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>27</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>MacBookPro15,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>28</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>MacBookPro15,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>29</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>MacBookPro15,3</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>30</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>MacBookPro15,4</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>31</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>MacBookPro16,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>32</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>MacBookPro16,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>33</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>MacBookPro16,3</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>34</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>MacBookPro16,4</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>35</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>MacBookPro17,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>36</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>MacBookPro18,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>37</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>MacBookPro18,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>38</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>MacBookPro18,3</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>39</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>MacBookPro18,4</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>40</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>MacPro7,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>41</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Macmini8,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>42</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>Macmini9,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>43</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>VirtualMac2,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>44</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>iMac19,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>45</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>iMac19,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>46</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>iMac20,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>47</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>iMac20,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>48</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>iMac21,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>49</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>iMac21,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>50</priority>
<and_or>and</and_or>
<search_type>is not</search_type>
<value>iMacPro1,1</value>
</criterion>
</criteria>
<computers/>
</computer_group>

 

To upload these smart group XML files to a Jamf Pro server server using the API, download the XML file to a convenient location, then run the commands shown below (substituting your Jamf Pro server and Jamf Pro user account information as appropriate):

Note: You will first need to get an API bearer token for authentication. Use the commands below (depending on which OS you’re using) to obtain a bearer token from your Jamf Pro server:

 

Get API bearer token on macOS Monterey and later:


curl -X POST -u username:password -s https://server.name.here/api/v1/auth/token | plutil -extract token raw –

view raw

gistfile1.txt

hosted with ❤ by GitHub

 

Get API bearer token on macOS Big Sur and earlier:


curl -X POST -u username:password -s https://server.name.here/api/v1/auth/token | python -c 'import sys, json; print json.load(sys.stdin)["token"]'

view raw

gistfile1.txt

hosted with ❤ by GitHub

 

 

The bearer token should look something like this:


eyJhbGciOiJIUzI1NiJ9.eyJhdXRoZW50aWNhdGVkLWFwcCI6IkdFTkVSSUMiLCJhdXRoZW50aWNhdGlvbi10eXBlIjoiSlNTIiwiZ3JvdXBzIjpbXSwic3ViamVjdC10eXBlIjoiSlNTX1VTRVJfSUQiLCJ0b2tlbi11dWlkIjoiODQwNzBjZjctOGYwNS00N2NhLTliNWItZjU3YzYwYTY2ZGIwIiwibGRhcC1zZXJ2ZXItaWQiOi0xLCJzdWIiOiIxMSIsImV4cCI6MTY2NTYwMTUzMX0.R8grAtlzG1raZw95HJqiLyxZavf03SwFqbgfb3eVSgg

view raw

gistfile1.txt

hosted with ❤ by GitHub

 

 

Once you have the bearer token, use to authenticate the API command as shown below:


curl -sf https://jamfpro.server.here/JSSResource/computergroups/id/0 -T /path/to/filename.xml -X POST -H "Authorization: Bearer API_Bearer_Token_Goes_Here"

view raw

gistfile1.txt

hosted with ❤ by GitHub

 

If the API bearer token is the one shown above, the API command should look something like this:


curl -sf https://jamfpro.server.here/JSSResource/computergroups/id/0 -T /path/to/filename.xml -X POST -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJhdXRoZW50aWNhdGVkLWFwcCI6IkdFTkVSSUMiLCJhdXRoZW50aWNhdGlvbi10eXBlIjoiSlNTIiwiZ3JvdXBzIjpbXSwic3ViamVjdC10eXBlIjoiSlNTX1VTRVJfSUQiLCJ0b2tlbi11dWlkIjoiODQwNzBjZjctOGYwNS00N2NhLTliNWItZjU3YzYwYTY2ZGIwIiwibGRhcC1zZXJ2ZXItaWQiOi0xLCJzdWIiOiIxMSIsImV4cCI6MTY2NTYwMTUzMX0.R8grAtlzG1raZw95HJqiLyxZavf03SwFqbgfb3eVSgg"

view raw

gistfile1.txt

hosted with ❤ by GitHub

 

 

If the smart group was successfully uploaded, you should next see output similar to that shown below:


<?xml version="1.0" encoding="UTF-8"?><computer_group><id>95</id></computer_group>

view raw

gistfile1.txt

hosted with ❤ by GitHub

 

The new smart group should now be present on the Jamf Pro server.

  1. June 12, 2024 at 3:07 pm

    Easier… Model Identifier matches regex:
    ^(MacPro[1-6],[0-9]|iMac([1-9]|1[0-8]),[0-9]|Macmini[1-7],[0-9]|MacBookAir[1-8],[0-9]|MacBookPro([1-9]|1[0-4]),[0-9])

    • June 12, 2024 at 11:26 pm

      Thanks for the tip! I’m not an API guru, so I tried both and that was quicker for me…

      Scott

    • James Reynolds
      June 13, 2024 at 9:51 pm

      I had to use this regex: ^(MacBookd|MacPro[1-6],[0-9]|iMac([1-9]|1[0-8]),[0-9]|Macmini[1-7],[0-9]|MacBookAir[1-8],[0-9]|MacBookPro([1-9]|1[0-4]),[0-9]).

      • James Reynolds
        June 13, 2024 at 9:55 pm

        That should be MacBook\d (backslash-d)

  2. James Reynolds
    June 13, 2024 at 9:54 pm

    Using jctl, I was able to create the regex version with this command.

    `jctl computergroups -jc ‘{ “name”: “Cannot Run macOS 15 Sequoia”, “is_smart”: “true”, “criteria”: { “size”: “51”, “criterion”: [ { “name”: “Model Identifier”, “priority”: “0”, “and_or”: “and”, “search_type”: “matches regex”, “value”: “^(MacBookd|MacPro[1-6],[0-9]|iMac([1-9]|1[0-8]),[0-9]|Macmini[1-7],[0-9]|MacBookAir[1-8],[0-9]|MacBookPro([1-9]|1[0-4]),[0-9])”, “opening_paren”: “false”, “closing_paren”: “false” } ] } }’`

    Hold tight. Using the full list of machine identifiers, I was able to create the group using this jctl command.

    `jctl computergroups -jc ‘{ “name”: “Cannot Run macOS 15 Sequoia4”, “is_smart”: “true”, “criteria”: { “size”: “51”, “criterion”: [ { “name”: “Model Identifier”, “priority”: “0”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac13,1”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “1”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac13,2”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “2”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac14,10”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “3”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac14,12”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “4”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac14,13”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “5”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac14,14”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “6”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac14,15”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “7”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac14,2”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “8”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac14,3”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “9”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac14,5”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “10”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac14,6”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “11”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac14,7”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “12”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac14,8”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “13”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac14,9”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “14”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac15,10”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “15”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac15,11”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “16”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac15,12”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “17”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac15,13”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “18”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac15,3”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “19”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac15,4”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “20”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac15,5”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “21”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac15,6”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “22”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac15,7”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “23”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac15,8”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “24”, “and_or”: “and”, “search_type”: “is not”, “value”: “Mac15,9”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “25”, “and_or”: “and”, “search_type”: “is not”, “value”: “MacBookAir10,1”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “26”, “and_or”: “and”, “search_type”: “is not”, “value”: “MacBookAir9,1”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “27”, “and_or”: “and”, “search_type”: “is not”, “value”: “MacBookPro15,1”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “28”, “and_or”: “and”, “search_type”: “is not”, “value”: “MacBookPro15,2”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “29”, “and_or”: “and”, “search_type”: “is not”, “value”: “MacBookPro15,3”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “30”, “and_or”: “and”, “search_type”: “is not”, “value”: “MacBookPro15,4”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “31”, “and_or”: “and”, “search_type”: “is not”, “value”: “MacBookPro16,1”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “32”, “and_or”: “and”, “search_type”: “is not”, “value”: “MacBookPro16,2”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “33”, “and_or”: “and”, “search_type”: “is not”, “value”: “MacBookPro16,3”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “34”, “and_or”: “and”, “search_type”: “is not”, “value”: “MacBookPro16,4”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “35”, “and_or”: “and”, “search_type”: “is not”, “value”: “MacBookPro17,1”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “36”, “and_or”: “and”, “search_type”: “is not”, “value”: “MacBookPro18,1”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “37”, “and_or”: “and”, “search_type”: “is not”, “value”: “MacBookPro18,2”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “38”, “and_or”: “and”, “search_type”: “is not”, “value”: “MacBookPro18,3”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “39”, “and_or”: “and”, “search_type”: “is not”, “value”: “MacBookPro18,4”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “40”, “and_or”: “and”, “search_type”: “is not”, “value”: “MacPro7,1”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “41”, “and_or”: “and”, “search_type”: “is not”, “value”: “Macmini8,1”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “42”, “and_or”: “and”, “search_type”: “is not”, “value”: “Macmini9,1”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “43”, “and_or”: “and”, “search_type”: “is not”, “value”: “VirtualMac2,1”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “44”, “and_or”: “and”, “search_type”: “is not”, “value”: “iMac19,1”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “45”, “and_or”: “and”, “search_type”: “is not”, “value”: “iMac19,2”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “46”, “and_or”: “and”, “search_type”: “is not”, “value”: “iMac20,1”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “47”, “and_or”: “and”, “search_type”: “is not”, “value”: “iMac20,2”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “48”, “and_or”: “and”, “search_type”: “is not”, “value”: “iMac21,1”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “49”, “and_or”: “and”, “search_type”: “is not”, “value”: “iMac21,2”, “opening_paren”: “false”, “closing_paren”: “false” }, { “name”: “Model Identifier”, “priority”: “50”, “and_or”: “and”, “search_type”: “is not”, “value”: “iMacPro1,1”, “opening_paren”: “false”, “closing_paren”: “false” } ] } }’`

    • James Reynolds
      June 13, 2024 at 9:56 pm

      Corrected command: `jctl computergroups -jc ‘{ “name”: “Cannot Run macOS 15 Sequoia”, “is_smart”: “true”, “criteria”: { “size”: “51”, “criterion”: [ { “name”: “Model Identifier”, “priority”: “0”, “and_or”: “and”, “search_type”: “matches regex”, “value”: “^(MacBook\d|MacPro[1-6],[0-9]|iMac([1-9]|1[0-8]),[0-9]|Macmini[1-7],[0-9]|MacBookAir[1-8],[0-9]|MacBookPro([1-9]|1[0-4]),[0-9])”, “opening_paren”: “false”, “closing_paren”: “false” } ] } }’`

    • James Reynolds
      June 13, 2024 at 10:00 pm

      And it looks like wordpress helpfully converted all the quotes to smart quotes. You’ll have to make them dumb…

  1. No trackbacks yet.

Leave a comment