Hi @developer sp1 ,
We can only use certificates for realizing app-only access for the Azure AD app, all other options are blocked by SharePoint Online and will result in an Access Denied message.
You could get this information here.
If the response is helpful, please click "Accept Answer" and upvote it.
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.