I failed one portion of the ID exam. Do I have to retake both sections

No, you can just retake the section that you failed. Keep in mind you have to pass that section within one year of the date that you passed the other section. You also need to apply for licensure within that one-year date.