The passuk in Ezra (6:4) says that when Koresh (and later, Daryavesh) gave the Yidden permission to build the second Beis Hamikdash, he told them to make the walls of "נִדְבָּכִין דִּי־אֶבֶן גְּלָל תְּלָתָא וְנִדְבָּךְ דִּי־אָע חֲדַת-three rows of marble stone and one row one wood". The Gemara (Rosh Hashanah 4a) says that the reason he said this was so that if the Yidden rebelled, he can easily burn the Beis Hamikdash, as it has wood in it which makes it flammable. From this we see that Daryavesh, even though he was good in the beginning, soured out. The Gemara asks, that Shlomo Hamelech did the same thing, as the passuk says (melachim I 6:36 in regard to the Azarah, and 7:12 in regard to the Ulam). The Gemara answers that there were three differences between how Shlomo Hamelech built it and how Daryavesh commanded to build it. First of all, Shlomo put his row of wood on top of the three rows of stone, so that even if there was a fire, the bottom of the wall would still be standing, while Daryavesh said to put the wood on the bottom, under the three rows of stone, so that if you burn it, the whole wall collapses. Secondly, Shlomo sunk the wood into the wall, with the stones protruding more than the wood, while Daryavesh made it even. Thirdly, Shlomo covered the wood with plaster, to prevent it from catching on fire, while Daryavesh didn't.
Now, there is an issue, as it is not allowed to have any protruding wood in the Azarah (Rambam Hilchos Beis Habechirah 1:9). Now, in the first Beis Hamikdash this is not a problem, as the beams were sunk into the wall and covered with plaster (and it can be that this is the reason Shlomo made it like this, so there won't be a problem), however in the second Beis Hamikdash there is a problem, as the wood was not sunk into the wall or covered over.
[There are those who say (Biurei Hagra to Middos 3:8) that only vertical beams are forbidden, as the issur is learned from the passuk that talks about a tree, so even regular wood is only forbidden when it is standing like a tree, but if it is laying down horizontally it is not a problem. Based on this, we can also answer our current question, as the beams in the walls were also lying down horizontally. However, most opinions don't mention such a differentiation, and it seems that they don't hold of it.]
Some Mefarshim answer (Tiferes Yisrael Middos 1:6 Boaz #5, see also Teshovos Haradvaz volume 5 Teshuvah 1467, Ma'aseh Rokeach and Har Hamoriah on Rambam Hilchos Beis Habechirah 1:9) that the problem is only with protruding wood, but if the wood is flush with the wall, even though it is not sunken in, it is fine. However, the Lubavitcher Rebbe brings sources that hold that even if it is not protruding it is a problem, and it must be sunk in or covered over with plaster or gold (Likutei Sichos volume 28, page 220, footnote 21). In fact, the Alter Rebbe writes in Likutei Torah (V'zos Habrachah 99d) that the proof of the Gemara that the king of Persia soured is because he said to put in these wooden beams in a way that is forbidden.
Now, based on this we can ask if they actually built it like he said. There are opinions that this Issur is M'drabanan (Ramban Devarim 16:21, Kesef Mishnah to Rambam Hilchos Avodah Zara 6:9), so we can say that Beis Din ruled that we can build it like this so as not to get into problems with the king (this is what Yosef Meiyers has written). However, even if we say this, most probably after the Greeks conquered Eretz Yisrael and the Yidden were not under Persian rule, they would have plastered over the beams, or cut into it to make it sunken into the wall, so there will be no problem.
I have added a new video of the Lishkos on the northern side of the first Beis Hamikdash..
My name is Mendel Lewis.
Hashem said to Yechezkel, "Its reading in the Torah is as great as its building. Go and say it to them, and they will occupy themselves to read the form of it in the Torah. And in reward for its reading, that they occupy themselves to read about it, I count it for them as if they were occupied with the building of it. (Tanchuma tzav 14)