Fix device assignment logic to set assigment token so the json has a
reference to the assignment.