
Hi @Anirudh Kompella
I will recommend you to use Azure AD app only. You can grant the app only with Sites.FullControl.All which will have full control of all site collections. Please refer to the following document
https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azuread
You can also register app only in SharePoint by refer to the document.
https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azureacs
For access all sites in SharePoint. You will need to register a Tenancy scope app. You need to call the appregnew.aspx page in https://contoso.sharepoint.com/_layouts/15/appregnew.aspx
. And grant permission in https://contoso-admin.sharepoint.com/_layouts/15/appinv.aspx
.
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.