Islam and astrology

Astrology refers to the study of the movements and relative positions of celestials bodies interpreted as having an influence on human affairs and the natural world. Islamic jurisprudence, the Quran, the Hadith, Ijma (scholarly consensus) and Qiyas (analogy) layout the guidelines for the stance that Islam takes on astrology. The determination on the concept is further subdivided into that which is either halal (pure) or haram (impure).Islam disagrees with celestial beings (including stars, moons, and galaxies) having an impact/influence on life forms. All Islamic sects and scholars embody the belief that astrology is forbidden as per the authorities encapsulated in the Quran and Hadith. 
Origins of Astrology in Islam.
The earliest traces of Muslim individuals and therefore an Islamic stance against that of astrology stems from individuals such as Abd al-Jabbar. This stance differentiates from that posed by individuals such as Abu Mashar who sought to justify the causal influence of celestial beings on terrestrial life forms. This is further evidenced by the presence of historical texts such as Kitab al-Daraj which are proof of the presence of astrology in early Islam. Yet even before these individuals/texts there existed historians and theologians such as Al Hashimi who through philosophers such as Masha Allah sought to justify the role of astrology in influencing Islamic adherents religion. Al Hashimi, citing upon the authority of Masha Allah looked to explore the possibility of the influence of stars on ones morality and religion in general. Masha Allah is further cited to point to the idea that the Prophet Muhammad's birth was a result of a coming together as such of celestial objects otherwise known as planetary conjunction; essentially pointing to the inherent birth of the Islamic prophet as a result of the astrological events. Where both Masha Allah and Al Hashimi draw upon similarities however is their inherent stance in pointing to the planets, stars, and other celestial beings as being the primary means by which divine rule is exercised i.e. how God emanates control over all life forms. The vast criticism received by individuals such as Al Hashimi led such figures to suggest that the determination of astrological claims could be computed without any interference with religion. The work of Al Hashimi nevertheless points to the inherent presence of astrology in early Islam.
Astrology in the Quran.
Many interpretations of the Quran (the primary Islamic text) point to Astrology as that which goes against the fundamental principles preached by the Islamic religious tradition. Astrology ultimately points to the role of celestial beings in influencing terrestrial life and the everyday lives of individuals; ultimately hindering their destiny. Various excerpts from the Quran are interpreted to disprove this theory. Most evidently with regards to those of horoscopes, Islamic scholars take the statements of the Quran in Surah Al-Jinn where it is suggested "(He Alone is) the All-Knower of the ghayb (unseen), and He reveals to none His ghayb (unseen), except to a Messenger (from mankind) whom He has chosen. (He informs him of unseen as much as He likes), and then He makes a band of watching guards (angels) march before him and after him" to mean that any such presence of extraterrestrial influence on mankind is not plausible and is, therefore, haram (forbidden) in Islam. This is further accentuated by tafsir (scholarly interpretation) of the verse which point to the fact that any being other than Allah (God) cannot be attributed with knowledge of the unseen or for that matter unknown. It is in this that the use of horoscopes and the subsequent utilisation of astrology are disproved in Islam. Nevertheless, Islam gives rise through the Quran to the use of astrology in determining the time of the year (i.e. the determination of the Lunar Calendar) as well as compass bearings. The Quran embodies this concept in pointing to celestial beings as 'landmarks' adorned for adherents as a means by which they would guide themselves. The Quran, therefore, points to the primary purpose of astrology as a means of providing physical guidance/navigation for an adherent, essentially considering its use in the capacity of horoscopes as forbidden.
Astrology in the Hadith.
The Hadith is a reference to the instructions and practices of the Prophet Muhammad which adherents of the Islamic faith are encouraged to embody. Prophet Muhammad made various claims regarding the legality/illegality of astrology with regards to the Islamic religious tradition. Narrated by Abu Dawud, it is suggested that the Prophet Muhammad stated "Whoever seeks knowledge from the stars is seeking one of the branches of witchcraft…”; that of which is inherently forbidden in Islam. Where the Hadith distinctly points to a strong stance against astrology and the consequent imposition of astrology as that which is forbidden is in Sahih Bukhari which is an authenticated source of the recounts of Prophet Muhammad. The Hadith suggests that rain is a bounty bestowed only by Allah (God). It goes on to suggest that any adherent that believes that rain is a result of the doings of any other being; living or not falls into disbelief. The Hadith makes specific mention to the stars in suggesting that as for those individuals who suggest rain originates as a result of a star, "that one is a disbeliever in Me (Allah)." This works to fundamentally embody the concept of astrology and the consequent belief in the idea that celestial beings have an influence on anything other than that enshrined in the Quran and Hadith as that which constitutes shirk (blasphemy); leading one to leave the fold of the religion. In ultimately pointing out that any suggestion of stars as performing any other duties other than as a means of navigation for man is forbidden, the Hadith works to point to astrology as that which Muslim adherents should refrain from. 
Scholarly Views on Astrology.
Varying scholars have differing opinions with regards to astrology and the judgment which Islam makes on its permissibility. One concept put forward arises from Imam Ali; the fourth caliph of Islam and the cousin and son-in-law of the Prophet Muhammad. Ali's pertinent point of view saw astrology to be that which is fundamentally forbidden in the Islamic religion. In suggesting to his followers that "O' People! Beware of learning the science of stars except that with which guidance is sought on land or sea because it leads to divining and an astrologer is a diviner, while the diviner is like the sorcerer, the sorcerer is like the unbeliever and the unbeliever would be in Hell", Ali sought to provide a scholarly opinion in pointing to a belief that any celestial being could provide something greater than that of God constitutes disbelief in Islam. This works in congruence with that encapsulated by the Quran which points to the stars and thus astrology as only a means of navigation. On the contrary, prominent individuals such as Ibn Arabi provide a scholarly opinion which provides for a limited scope of agreement with the principles of astrology. This is accentuated by the Ikhwan who have pointed to particular prophets and thus historic events as being intrinsically influenced by celestial beings. Such individuals nevertheless are in agreement that the planets in no means are considered God yet do suggest/assign each Prophet with a particular planet/celestial being with certain works pointing to the planets as being created in God's image.
Islamic Sects and Astrology.
Differing sects of Islam offer varying perspectives on the concept of Astrology.
Sunni Islam.
Most Sunni Islam sources point to an inherent disagreement against all forms of astrology which attempt to suggest divine intervention on behalf of celestial beings. This is furthered by prominent Sunni scholars who have sought to detest the use of stars for the purpose of anything other than a means of navigation and for the purpose of determining the time of the year.
Prominent Sufi scholars such as Ghazali and Ibn Arabi offer differing perspectives on that of astrology. Most pertinently, Sufism focuses on mankind at the forefront of the cosmos which consequently revolves around a man. Ultimately, as per the teachings of Ghazali and Ibn Arabi, Sufism preaches an abstract form of astrology in which the planetary beings correspond to certain levels of heaven and where particular Prophets correspond to certain heavens; thus perpetuating in a fundamental belief that particular historical events have eventuated as a result of celestial beings.
Shia Islam.
Shia Islam takes a similar stance to that of Sunni Islam with prominent scholars such as Qabisah and Razin Bin Muawiyah suggesting that the presence of stars and celestial beings and their consequent importance lies only in their beautification of the sky, their ability to ward of Satan and that of navigation. Prominent Shia scholars have claimed that the concept of astrology is one which leads individuals to commit the sin of shirk (blasphemy); arguing that the concept of inferring something to carry a good or bad omen as that which constitutes disbelief.