Foreign majority investment in land and real estate units are prohibited unless for the purposes of carrying out commercial activities in Tanzania. 
"2. Interpretation
In this Act, unless the context required otherwise—[...]
"derivative right" means a right to occupy and use land created out of a right of occupancy and includes a lease, a sub-lease, a licence, a usufructuary right and any interest analogous to those interests;[...]
"foreign company" means a company classified as a foreign national by the Tanzania Investment Act; [Cap. 38][...]
"granted right of occupancy" means a right of occupancy granted under and in accordance with Part VI; [...]
"land" includes the surface of the earth and the earth below the surface and all substances other than minerals and petroleum forming part of or below the surface, things naturally growing on the land, buildings and other structures permanently affixed to or under land and land covered by water;[...]
"right of occupancy" means a title to the use and occupation of land and includes the title of a Tanzanian citizen of African descent or a community of Tanzanian citizens of African descent using or occupying land in accordance with customary law;
[...]
Part V – Rights and incidents of land occupation
19. Rights to occupy land
(1) The rights to occupy land which a citizen, a group of two or more citizens whether formed together in an association under this Act or any other law or not, a partnership or a corporate body, in this Act called "right holders" may enjoy under this Act are hereby declared to be— (a) granted right of occupancy; (b) a right derivative of a granted right of occupancy, in this Act called a derivative right;
(2) A person or a group of persons, whether formed into a corporate body under the Companies Act or otherwise who is or are non-citizens, including a corporate body the majority of whose shareholders or owners are non-citizens, may only obtain— [Cap. 212]
(a) a right of occupancy for purposes of investment approved under the Tanzania Investment Act; [Cap. 38]
(b) a derivative right for purposes of investment approved under the Tanzania Investment Act or issued under the Export processing Zones Act; or [Cap. 373]
(c) an interest in land under a partial transfer of interest by a citizen for purposes of investment approved under the Tanzania Investment Act or issued under the Export processing Zones Act in a joint venture to facilitate compliance with development conditions.
[...]
20. Occupation of land by non-citizen restricted
(1) For avoidance of doubt, a non-citizen shall not be allocated or granted land unless it is for investment purposes under the Tanzania Investment Act.[...]
(4) For the purposes of this Act, any body corporate of whose majority shareholders or owners are non-citizens shall be deemed to be non citizens or foreign companies.
[...]
25. Procedure for application for right of occupancy
(1) An application for a right of occupancy shall—[...]
(h) if made by a non-citizen or foreign company, be accompanied by a Certificate of Approval granted by the Tanzania Investment Centre under the Tanzania Investment Act, and any other documentation which may be prescribed by that Act or any other law.
(1A) Where an application for a right of occupancy or a derivative right, which is made by a non-citizen or a foreign company, is for residential purposes, the use of such land shall be secondary or ancillary to the investment approved under the Tanzania Investment Act.[...]" (Land Act (Chapter 113), 2001)
Land Act (Chapter 113), 2001
[<a href="https://tanzlii.org/akn/tz/act/1999/4/eng@2019-11-30">Act</a>]