I read that Napoleon claimed to follow Allah and to even be one of his descendant, to get the Egyptians to support him against the Mameluke, during his Egyptian campaign. Did the Egyptians fell into it, or were they just playing along, and how did this blaspheme was accepted by his christian support?
In my mind, people were still pretty religious at this time and it would be considered a crime by most.
Firstly, just a correction: He claimed to be a descendant of Muhammad, not Allah.
Barely any Egyptians genuinely believed he was a descendant of Muhammad, but those that did look relatively favourably upon Napoleon did so not because of his supposed divine heritage but because he mostly treated Islam with respect (aside from threatening to blow up a mosque that rebels hid inside of) and ordered his soldiers to do the same. He believed strongly in religious toleration and made it an official policy on his campaigns, first with Jews in Italy and Malta and then with Muslims in Egypt. He didn't want to appear as a modern-day crusader, and intentionally tried to foster an image that would please the Egyptians, such as dressing like they did in trousers and a turban, riding a camel, and quoting from the Koran (these things elicited mockery from many of his officers). Napoleon was a master of PR wherever he went, and is quoted as having said on the topic of religion while in Egypt that he would appear to adopt the religion of whatever land he wanted to conquer, be it Christian, Muslim or Jewish ("If I took Jerusalem I would rebuild the Temple Mount", to paraphrase part of said quote). Napoleon did make several comments that could be interpreted as expressing a preference for Islam, especially in regards to the issues of multiple wives, Sharia Law (he admired it because it fused religion with the law), and Islam's military history - he expressed praise that Muslims conquered so much land in only a few decades whereas it took Christians centuries to do the same.
As to how his army responded to his favourable attitude towards Islam, I'm not aware of what the bulk of the regular infantry thought, but among his senior officers and generals there was little outright opposition or hostility to it, more just light mockery or indifference. As mentioned earlier, many of them found it very funny when he tried to dress like an Egyptian, and when he saw their reaction he stopped doing it. He strictly forbade any discrimination against Egyptians because of their religion, declaring that his army would be like the Roman legions, who respected the gods of all the peoples they conquered. He said of Muslim Egyptians that "they may treat their wives differently to how we do", but that their customs should be respected nonetheless, both out of consideration for the Revolutionary ideals that were pervasive throughout the army, and also out of practicality because they were so vastly outnumbered by their new conquered subjects. One of the core tenants of the French Revolution was secularism and the restriction of formal power held by the Church, and so the army that invaded Egypt was not some religiously dogmatic crusading force, but a relatively enlightened and tolerant army of liberation (that's how they viewed themselves, regardless of the more realpolitik planning that went on in the French government and military high command). There are several stories of French soldiers, officers and generals taking Muslim Egyptian mistresses, and even one taking a wife and converting to Islam so as to justify having a second wife (Napoleon jokingly asked him whether he'd submit to being circumcised). The allure of being in a foreign land with an ancient history and surrounded by exotic women totally unlike their own French women proved to be a stronger deciding factor that mere religion (at least for many).
Source: Napoleon the Great by Andrew Roberts