Ezra, Nehemiah, and Daniel

In the cases of Ezra, Nehemiah, and Daniel, we need to note that they identified with the sins of their ancestors and their people, not all of which they themselves committed:
Dan. 9:8—“O Lord, we and our kings, our princes and our fathers are covered with shame because we have sinned against you. . . .”
Dan. 9:20—“While I was speaking and praying, confessing my sin and the sin of my people Israel and making my request to the LORD my God for his holy hill. . . .”
Ezra 9:5-7, 14—“Then, at the evening sacrifice, I rose from my self- abasement, with my tunic and cloak torn, and fell on my knees with my hands spread out to the LORD my God and prayed: "O my God, I am too ashamed and disgraced to lift up my face to you, my God, because our sins are higher than our heads and our guilt has reached to the heavens. From the days of our forefathers until now, our guilt has been great. Because of our sins, we and our kings and our priests have been subjected to the sword and captivity, to pillage and humiliation at the hand of foreign kings, as it is today. . . . Shall we again break your commands and intermarry with the peoples who commit such detestable practices? Would you not be angry enough with us to destroy us, leaving us no remnant or survivor?”
Neh. 1:6-7—“Let your ear be attentive and your eyes open to hear the prayer your servant is praying before you day and night for your servants, the people of Israel. I confess the sins we Israelites, including myself and my father's house, have committed against you. We have acted very wickedly toward you. We have not obeyed the commands, decrees and laws you gave your servant Moses. Remember the instruction you gave your servant Moses, saying, ‘If you are unfaithful, I will scatter you among the nations, but if you return to me and obey my commands, then even if your exiled people are at the farthest horizon, I will gather them from there and bring them to the place I have chosen as a dwelling for my Name.’”

Source: Dr. Gary S. Greig - The Biblical Foundations of Identificational Repentance as One Prayer Pattern Useful to Advance God's Kingdom and Evangelism, April 2001