In 2006, before Obama was president, he gave a major address at the Sojourners convention : “A Call to Renewal on Faith and Politics.”
He was astonishingly candid for a politician and very clear on his faith and his belief in the freedom of religion. He talked about how offended he was when one of his opponents for U.S. Senate said he was not a Christian. He related how he had not been religious when he went to Chicago but then joined the church. “You need to embrace Christ precisely because you have sins to wash away — because you are human and need an ally in this difficult journey.”
The speech was a tour de force. It was one thing to proclaim your belief in God, in fact it was obligatory in order to get elected, but it was not really expected that anyone would elaborate on the subject.