Hi @rashmi sharan ,
You can define applications in Azure AD and these applications can be granted permissions to SharePoint, but also to all the other services in Office 365. This model is the preferred model in case you’re using SharePoint Online.
I have found a nice article that might help you
https://medium.com/@hubfly/generate-graph-api-access-token-in-sharepoint-provided-hosted-app-2ff23f0eccf2
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.