Download Configuration Profiles from JSS with curl command

fritz_schlapbac
Contributor

Hi

I'm trying to download a .mobileconfig file from the JSS server with curl. Does someone have a tip how I can do this?

For example I'm trying something like this to download a configuration profile with the name "Standard Profile" from the server:

curl -k -v -u test:test "https://servername.domain.net:8443/int/exportOSXConfigurationProfile.html?profileId=3&filename=Standard%20Profile" -o ~/Desktop/test.mobileconfig

The test.mobileconfig file then contains the text "Your session has expired
If you have just logged in, please ensure that your browser has cookies enabled ".

So at least one problem seems to be the cookie. I also tested with the --cookie-jar and --cookie parameters. So far without success. The command above is just one example of many I have tried.

Thank you.

1 ACCEPTED SOLUTION

fritz_schlapbac
Contributor

I didn't realize then that the configuration profiles are saved in the caspershare folder. In there is a folder with the name "ConfigurationProfiles". So you can just mount the caspershare with a script and copy or install the profiles from there.

When I started the discussion i thought the profiles are only accessible with the web interface.

View solution in original post

5 REPLIES 5

Cem
Valued Contributor

fritz_schlapbac
Contributor

Yes. This works for downloading them manually. My idea is to download the profile automatically with a script and install it.

This way I could only change the profile on the server and every client would get the changes when they download and install the profile the next time.

Im trying this as a workaround for the APNS. Our security don't like it to open the necessary ports for APNS.

BTW: Jamfnation urgently needs a mail notification system if there are answers to your discussions... ;-)

Cem
Valued Contributor

I wish I have an answer for script wise. But certainly you can package them with postflight profile import script and make it available through Self Service etc...

aburrow
Contributor

Did you ever get curl or similar working to download your profiles. I've got a similar issue on our network.

fritz_schlapbac
Contributor

I didn't realize then that the configuration profiles are saved in the caspershare folder. In there is a folder with the name "ConfigurationProfiles". So you can just mount the caspershare with a script and copy or install the profiles from there.

When I started the discussion i thought the profiles are only accessible with the web interface.