Hi @Subramanyam k · Thank you for reaching out.
In order to avoid user consent, a consent needs to be granted for the entire organization/tenant by using the Global Admin account of the tenant. For this purpose, you can leverage prompt=consent
parameter of Oauth protocol, as mentioned in below call:
https://login.microsoftonline.com/MY_TENANT.onmicrosoft.com/oauth2/v2.0/authorize?client_id=MY_APP_ID_GUID&response_type=code&redirect_uri=MY_REPLY_URL&state=1234&response_mode=query&scope=MY_SCOPES&prompt=consent
Once you sign in using Global Admin account, you will get a checkbox to provide consent for the organization as highlighted below:
Note: For certain scopes/permissions, a consent is needed to be provided. You can avoid per user consent as mentioned above but there is no way to skip the consent prompt entirely.
-----------------------------------------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.