What to do after SAML assertion is returned to service provider?

Hi all, my team is building a healthcare React application and we are using Auth0 for authentication. We are required to have SAML integration for healthcare institutions.

I have set up the Assertion Consumer Service endpoint in our application. I have set up a Keycloak instance as our internal test IDP. Right now, it is able to receive SAML responses with the assertion from the test IDP.

From here on, I’m not sure what to do next. I have read that I can request an auth token using the SAML assertion. When I try invoking this command:

curl -X POST “/oauth/token” -H “Content-Type: application/x-www-form-urlencoded” -d "grant_type=urn:ietf:params:oauth:grant-type:saml2-bearer&assertion=<64 base encoded assertion>

I get " {“error”:“unauthorized_client”,“error_description”:“Grant type ‘urn:ietf:params:oauth:grant-type:saml2-bearer’ not allowed for the client.”,“error_uri”:“”}"

What am I doing wrong? Thanks!