Hi @Raghavendra · Thank you for reaching out.
I can think of 2 reasons for this issue:
- Please check if your authentication request includes
prompt=consent
parameter, when this parameter is passed, users are prompted with a consent prompt each time they access the application. Ref. https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.client.prompt?view=azure-dotnet - The application might be requiring permissions which require admin consent. Please use below url to grant admin consent for entire organization/tenant:
https://login.microsoftonline.com/{tenant-id}/adminconsent?client_id={client-id}
If the users are getting consent prompt only at the initial sign-in and not afterwards, it must be due to the requirement of user consent. This depends on what permissions you have included in the scope parameter of your authentication request. For certain scopes, user consent is required. If this is the case, follow step 2 that I have shared in my answer above. Users will not be required to provide consent as admin has already provided consent for entire organization.
If users are repeatedly getting consent prompt, even after consenting, you must update your code to not include prompt=consent in the request.
-----------------------------------------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.