Ezra 1-6 must be read together with Haggai and Zechariah 1-6. These chapters concern the rebuilding of God's temple under the leadership of Zerubabel and Joshua, the high priest in 515BC. But it appears that after two generations, things in Judah began to fall apart. Again, God raised leaders to restore His people. The walls of Jerusalem fell into ruins and God sent Nehemiah to rebuild the ruins and restore the walls. But Ezra who was a contemporary of Nehemiah (450BC) took a leading role in restoring worship and spirituality of the people of God. King Artaxerxes of Persia seemed to favour Ezra a great deal as we read in Ezra 7-8. In what capacity did Ezra serve the king was not entirely clear though he could be one of the scribes or secretaries of the palace. Nevertheless, it is clear that Ezra gained favour in the eyes of the king like Nehemiah did, and both ascribed royal favour as a sign of divine favour that God's hand was upon them in all their endeavours.
Ezra was also called a priest and a scribe of the law of God. This latter designation seems to be Ezra's main qualification and it is Ezra's expertise in the law of Yhwh that was mentioned several times in the king's letter to him (7:6, 10, 12, 14, 25). Several times, Ezra said that it was God who strengthened him. He even refused the king's protection for his dangerous journey from Babylon to Jerusalem which took four months. He rejected the idea of asking the king for help because he has testified that the God of Israel was well able to help those who seek Him. Ezra did not want to the king to think that he had no faith in this God whom he claimed to worship. Surprisingly, the king of Persia was extremely sensitive to the needs of the people of Judah as several times over, he commanded that Ezra should teach those who did not know the laws of Yahweh at the pain of hefty punishment. Apparently, Ezra was not only well regarded by the Persian ruler but he was also well suited to his task in leading the people in two main respects.
First, Ezra sought to study to law of the Lord, obey it and teach it to the people of Israel (Ezra 7:10). Ezra was a highly trained scribe or expert in God's law. This fundamental requirement of leadership seems to have been lost or gravely neglected as many church leaders and pastors are not trained in any depth of God's Word (2 Timothy 3:16-17). Look at most of the Seminaries' offerings of less than 10% of all subjects majoring in biblical studies. Most of the papers are on practical theology or social studies which one could learn on the job or by observation and imitation of senior pastors. No wonder no major revival or restoration of God's people is felt and the people of God are like sheep without a shepherd.
Second, Ezra is a man of prayer and an intercessor. At least 4 or 5 times in the second part of the book, it is mentioned that Ezra prayed and acknowledged God's answer to prayers. Before he set out on his journey, he called for prayer and fasting. He led by example. He did not just tell other people to pray but he was a man of prayer himself and a prayer leader. If fact, any spiritual leader must be a man of prayer and a prayer leader as God's power is poured out and His will revealed as we pray and seek His face. He was confident of God's protection and hence, he refused to ask for the king's help of security guards and calvary to escort him and his entourage back to Jerusalem. When he found out the sins of His people, Ezra went to the house of God where he tore his clothes, wept and prayed. Ezra's action of praying stirred up the souls of his fellow Israelites and they gathered around him and prayed along-side with him (Ezra 9:3-5). Ezra's spiritual authority lies in his love for God and his obedience of God's will as revealed in His Word. He seeks God by prayer and fasting. He leads his people in prayers and fasting and out of that spiritual authority, the people of Judah repented and experienced great revival and restoration in Ezra's days.