Service-oriented architecture (SOA) has been widely used to design enterprise applications in the past two decades. The services in SOA are becoming complex with the increase in changing user requirements and SOA is still seen as monolithic from a deployment perspective. Monolithic services make the application complex, and it becomes difficult to maintain. With the evolution of microservices architecture, software architects started migrating legacy applications to microservices. However, existing migration approaches in the literature mostly focus on migrating monolithic applications to microservices. To the best of our knowledge, very few works have been done in migrating SOA applications to microservices. One of the major challenges in the migration process is the extraction of microservices from the existing legacy applications. To address this, we propose an approach to extract the candidate microservices using graph based algorithms. In particular, four algorithms are defined: (i) construction of service graph (SG), (ii) construction of task graph (TG) for each service of the a SOA application, (iii) extraction of candidate microservices using the SG of SOA application, and (iv) construction of a SG for a microservices application to retain the dependencies between the generated microservices. We chose a SOA-based web application to demonstrate the proposed microservices extraction approach and extracted the microservices. Additionally, we have evaluated the extracted microservices and compared them with SOA based services.