Sayyiduna Abdullah (may Allah be pleased with him) says that whoever builds on a people's land without their permission, it will be pulled down; and if he built it with their permission, its value will be paid.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب العارية / 11488
It is narrated from Shurayh (may Allah have mercy on him) concerning a person who builds on a people's land with their permission, that he is entitled to its value.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب العارية / 11490
It is reported from Qadi Shurayh (may Allah have mercy on him) the same as the statement of Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him).
A marfu' hadith (attributed to the Prophet) has also been narrated on this, but it is not established.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب العارية / 11491
It is narrated from Sayyidah Aishah (may Allah be pleased with her) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever builds on a people's land with their permission, its value will be paid; and whoever builds without permission, it will be pulled down."
Umar bin Qays al-Makki is da'if (weak) and is not used as evidence, and those below him (in the chain) are also weak.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب العارية / 11492