the App you are using "Dataverse Application" in azure app. That needs to be associated with Dataverse (aka. Power Platform). Create an application user using "Maker Portal" (https://make.preview.powerapps.com). Select your environment and go to Application User. Provide your "Client ID" and assign it a Dataverse Role. Now when you authenticate it should go through. Because this is not 401, this is 403 (Forbidden access)