Sharepoint App as Identity Provider

Hello,

I am trying to use a Sharepoint App as my Identity Provider for Keycloak. I am using the microsoft Identity provider in Keycloak, where I added the client_id and the client_secret. I also added the redirect_uri to the Sharepoint App. However when I try to sign in with microsoft using I get the following error:

 We're unable to complete your request

unauthorized_client: The client does not exist or is not enabled for consumers. If you are the 
application developer, configure a new application through the App Registrations in the Azure Portal at 
https://go.microsoft.com/fwlink/?linkid=2083908

And before I was getting:

Sorry, but we’re having trouble with signing you in.
AADSTS90036: An unexpected, non-retryable error stemming from the directory service has 
occured.

Has anyone successfully registered a Sharepoint App as an Identity Provider by Keycloak? I could use some guidance here…