The MUT - Failed! - 404!

sncruz
New Contributor

I'm trying to add new records to my JSS and am getting Failed! 404!

I've tried the following so far:

-made sure that my file is saved as Windows CSV
-I only have tow columns Serial number and Username
-I have omitted the trailing slash
-my user account is full admin and name doesn't have any special characters.

Thanks.

4 REPLIES 4

mike_levenick
New Contributor III
New Contributor III

Hey @Cruz ,

The MUT isn't really made for record creation. It is designed to update things that are already in the JSS, such as changing the username associated to devices.

That said, due to the fact that the JSS creates usernames on demand, you can do a "work around" to create users with the MUT by associating usernames with the same device over and over.

For example, if your device is currently assigned to you, and it has a serial number of "C12345678", you could create a CSV similar to this:

C12345678, John.Smith
C12345678, Sally.Smith
C12345678, Jimmy.Johnson
C12345678, Jane.Johnson
C12345678, Whoever.Else

And it will create the users John.Smith, Sally.Smith, Jimmy.Johnson, Jane.Johnson, and Whoever.Else if they do not exist yet. At the end, your device will be assigned with "Whoever.Else" so you can just assign it back to yourself. However, device with serial C12345678 must already exist in the JSS.

If this is the workflow you're trying to do, double check the serial in column A to verify that it exactly matches the serial of a device in your JSS--often times different SIS and stuff will prepend or append different characters, so your CSV might say like "SC12345678" which will throw a 404.

sncruz
New Contributor

Thank you Mike. It worked!

Would there be a possibility of somehow populating a test database with iOS and OS X serial numbers? This is just for the purpose of having a test environment.

Thank you again.

Sandy

Hey @mike_levenick,

Apologies ahead of time for reopening this issue up. I am trying to import usernames and email addresses and getting the error below (Failed PUT. 404) and not quite sure why atm (please note I renamed the company name and username).

Here's the output from the logs:

2022-04-18 17:06:07 [INFO ]: Beginning CSV Parse - Attributes update.
2022-04-18 17:06:07 [INFO ]: Attempting to GET the Jamf Pro Version from the API.
2022-04-18 17:06:07 [INFO ]: Successful GET completed. 200.
2022-04-18 17:06:07 [INFO ]: Jamf Pro Version: 10.26.1-t1606923553
2022-04-18 17:06:07 [INFO ]: Submitting a PUT to https://companyname.com:8443/JSSResource/users/name/xxx.xxxx
2022-04-18 17:06:07 [ERROR ]: Failed PUT. 404.
2022-04-18 17:06:07 [ERROR ]: <html>
<head>

 

Forgive me here since I am new at using your app, but I am trying to populate missing usernames and email addys to associate them with already existing computer names in my JAMF instance. Maybe I am going the wrong way but what would be the best method to do so? I am not seeing a template with all 3 attributes (username, email adds, computer names).

 

 

 

Also, what would be the proper way to associate 

Hi @dpinai_IH 

I'm assuming from your message you're attempting to create (currently non-existent) users in Jamf Pro using MUT.

We can do this, but it's a little complicated, because basically MUT cannot CREATE usernames, but it can ASSIGN them. The good news is that Jamf Pro is smart enough to CREATE a user that does not yet exist, if it is being ASSIGNED to a device.

So the workaround is to do one of the following:

  1. If you already know what devices all of your users and email addresses are going to be assigned to, simply fill out your CSV file to assign those users to those devices. This will be a "Mobile Device" or "computer" update, not a "user" update. Populate the serial number in column A for all the devices, and fill out the username and email fields, then submit. MUT will assign the users, and Jamf Pro will automatically create those users and give them the email address you put in the CSV. It Just Works™
  2. If you do not yet know what devices these users will be getting, but want to create them ahead of time, simply pick one device (such as your test device) and assign each user and email to it over and over and over. Then at the end, re-assign the device to yourself or whatever. So your CSV will look something like this (except I've removed all the non-used columns, which MUT won't allow):
    Serial Number,Username,email,otherstuff,whatever
    C11111,john.smith,john.smith@company.xyz
    C11111,jane.smith,jane.smith@company.xyz
    C11111,billy.bob,billy.bob@company.xyz

MUT will assign the first user to the device, and Jamf Pro will create it. Then MUT will assign the second user to the device, and Jamf Pro will create it, etc. all the way down the line.

Just note that any other user information that's on that device (such as phone number) which is NOT in your CSV will still transfer to the new users as well, so either make sure your device has no user information associated with it, or make sure your CSV is fully populated.