I know that Medieval Muslim thinkers were influenced by ancient Greek philosophy, but did they aslo study the hisotry of the Greco-Roman the preceded them, and if so what did they think of them ?
Oh, this was actually part of the subject of my bachelor's thesis, at least up to the end of the 11th century! It's been a while since I've talked about this topic, so please bear with me.
To begin with, it's important to understand that early Muslim historians were preoccupied with helping legitimize the political authority they belonged to. The histories of the Abbasid caliphs will differ in tone and detail from Shi'a histories, for example. Part of this process meant that, for the most part, during the early part of the Islamic Golden Age, Muslim historians would only be interested in other peoples, be they Greeks, Romans, or in people of other faiths, if it would help them in legitimizing the authority they served. Often, in the case of the Romans and the Persians especially, they were portrayed as adversaries that were bested by the Muslim leadership, an indirect proof that God favored those specific Muslims. Other times, certain individuals among the Romans - most notably, the Byzantine Emperor Heraclius - are portrayed as wise men who acknowledge the truth of the Muslim faith and of Muhammad's status as a Prophet, but who, for one reason or another - usually, their insidious countrymen - cannot convert and join them. There is also a trend in early Muslim writings to "quote" Christian or Jewish clergy as having prophesied the coming of Islam and of Muhammad.
Another important point to bring up is that Muslim historians began as Hadith authors, not as historians in the Greco-Roman sense. For those unaware, Hadith are, in short, stories with a religious significance, usually regarding an event in Muhammad's life. Most importantly, when it comes to Hadith, their authors are expected to retell them as accurately as possible to the source materiel, and to write down their sources, in the form of a chain of individuals, preferably as close to Muhammad or his Companions as possible. For example, "So says X, who heard it from Y, who heard it from Z etc." What this means for our purposes is that early Muslim historians simply weren't interested in using Greek or Roman sources, because they had little or nothing to do with Muhammad or Islam and weren't considered to be particularly trustworthy either.
This gradually starts to change in about the 9th century. The Abbasid Caliphs came to power with the assistance of an important Persian elite, so historians gradually started to preoccupy themselves with Persian history as well. The man considered the greatest Hadith historian, al-Tabari (839 - 923), dedicated a significant chunk of his frankly enormous work to Persian history (though it's worth mentioning that he was an Iranian himself). Their methodology also changes, as the Adab (literally "education") and Hikma (literally "learning") intellectual currents start gaining importance. Historians are no longer obligated to simply retell events exactly as they heard them (well, admittedly selectively), instead they can bring their own interpretation and judgement. Over time, historians (who often had other professions as well, such as judges) start using and quoting Greek and Roman written sources, which were already in use at the time by Muslim doctors and philosophers. Not only that, but these sources often receive the same attention and respect as Muslim sources. For instance, the historian al-Masudi, when he wrote about the history of the Roman Empire, mentioned something to the likes of "if you want to learn more and in greater detail, read the books of the Syrian Christians". Eventually, they even start writing "Universal histories", histories of the entire world and of its civilizations, not just of the Muslim community. This is when their view of the Greeks and the Romans really starts to change; they're not just adversaries or sources of prophecy anymore.
In the view of these Muslim historians (and of Medieval Christian writers as well), each of the peoples of the Earth are descended from one particular son of Noah (for those unaware, the man whose family was spared by God during the Biblical Flood). Europeans are generally considered to be the descendants of Japeth, who, along with the third child Ham, were banished by their father. However, Romans and Greeks, alongside Persians, Jews and Arabs, are considered to be descendants of Shem, the most blessed child. These peoples are considered to be a cut above the rest because of this. After all, as the Muslim historians say, Rome and Persia became great empires and the Greeks made great advances in the sciences.
These views gradually evolved and changed as the Crusades took place, but, to be perfectly honest, that is beyond the scope of my expertise on the matter.
Hope this helped!
Some bibliography:
Boaz Shoshan, The Arabic Historical Tradition and the Early Islamic Conquests: Folklore, Tribal Lore, Holy War. London: Routledge, 2016.
Fred M. Donner, Narratives of Islamic Origins: The Beginnings of Islamic Historical Writing. New Jersey: The Darwin Press, 1998.
Nizar F. Hermes, The [European] Other in Medieval Arabic Literature and Culture. New York: Palgrave Macmillan, 2012.
Tarif Khalidi, Arabic Historical Thought in the Classical Period. Cambridge: Cambridge University Press, 1994.
Scott Savran, Arabs and Iranians in the Islamic Conquest Narrative. Memory and Identity Construction in Islamic Historiography. London: Routledge, 2018.