Created
October 27, 2018 23:13
-
-
Save talkingmoose/1533e8268b89491c1a67ef0ffbafd774 to your computer and use it in GitHub Desktop.
Programmatic method to change a Jamf Pro server's Activation Code via the Classic API.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# server connection information | |
URL="https://jss.talkingmoose.net:8443" | |
userName="JSSAPI-Editor" | |
password="password" | |
# XML data to upload | |
THExml="<activation_code> | |
<organization_name>Talking Moose Industries</organization_name> | |
<code>V7OV-XDEU-DOBI-UDEU-7DEU-DOUD-QRUD-EGNR</code> | |
</activation_code>" | |
# flattened XML | |
flatXML=$( /usr/bin/xmllint --noblanks - <<< "$THExml" ) | |
# API submission command | |
/usr/bin/curl "$URL/JSSResource/activationcode" --user "$userName:$passWord" --header "Content-Type: text/xml" --request PUT --data "$flatXML" | |
exit 0 |
Yes I’m sure activation key is valise took from my account.
I used your script to do this
Just edit the url I’d password and licence
Tried two account and the same error.
On Mon, 27 Jun 2022 at 10:40 AM, Manikandan R ***@***.***>
wrote:
***@***.**** commented on this gist.
------------------------------
I’m using JAMF 10.25.2
On Mon, 27 Jun 2022 at 10:12 AM, William Smith ***@***.***>
wrote:
> ***@***.**** commented on this gist.
> ------------------------------
>
> Not sure if this was changed in Jamf Pro 10.35.0 along with adding
support
> for Bearer Token for the Classic API, but looks like it requires the
> credentials be passed as an encoded string.
>
> I've posted an updated version here:
> https://gist.github.com/22f749726318b7523d52259c7b0f4302
>
> —
> Reply to this email directly, view it on GitHub
> <
https://gist.github.com/1533e8268b89491c1a67ef0ffbafd774#gistcomment-4213255
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AMUGJUYPMGD3YGVGQG5MSB3VREWKJANCNFSM5ZUN23SA
>
> .
> You are receiving this because you commented.Message ID:
<talkingmoose/Change
> Jamf Pro Activation ***@***.***>
>
--
Thanks & Regards,
Manikandan R
Contact: +91-9902103878
E-mail: ***@***.***
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/1533e8268b89491c1a67ef0ffbafd774#gistcomment-4213280>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMUGJUZ7RSXI4VEXCEYUTXLVREZSTANCNFSM5ZUN23SA>
.
You are receiving this because you are subscribed to this thread.Message
ID: <talkingmoose/Change Jamf Pro Activation Code.sh/comments/4213280@
github.com>
--
Thanks & Regards,
Manikandan R
Contact: +91-9902103878
E-mail: ***@***.***
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes activation key is valid and I used your script to change
I logged call with JAMF let me try with them .