Hi @Gayatri Krishnan ,
Thanks for using Microsoft Q&A !!
If I understand correctly, your web activity is failing to get Sharepoint Online tokens using the registered application.
By error message it looks like application registration or permissions issue.
Are you checking permissions under Registred applications on Azure Active Directory blade on Azure portal?
Can you please check your Sharepoint application principals site by going to https://{Sharepoint Name}.sharepoint.com/_layouts/15/appprincipals.aspx?Scope=Web
if your application is showing up there.
If not, then please try to follow step 2 - Grant SharePoint Online site permission to your registered application of the documentation. Please make sure you are passing the exact XML as mentioned like below
<AppPermissionRequests AllowAppOnlyPolicy="true">
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="Read"/>
</AppPermissionRequests>
Thanks
Saurabh