function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rest API IntegrationRest API Integration 

Saml bearer Assertion error (unsupported response type )

I have created SAML assertion with referce to link http://tools.ietf.org/html/draft-ietf-oauth-saml2-bearer-10

I refered  https://login.salesforce.com/help/doc/en/remoteaccess_oauth_SAML_bearer_flow.htm link

according to above link I did

  • Organization creates a Remote Access OAuth Consumer -- created Remote access application with following details 

                Callback URL : https://test.salesforce.com/services/oauth2/success -- as I am accessing this from standalone class

I checked  : No user approval required for users in this organization

I uploaded certificate , same certificate I used for signing my assertion created.


  • Organization writes an application that generates a SAML token

For this I  made post call to

         URL :  https://login.salesforce.com/services/oauth2/authorize

and data : 

post.addParameter("client_id","3MVG9Y6d_Btp4xp7hhxW8OtuTagu9IvM6pZ9WwW6ODSVU.4Qp8vV0XB2i0sQ0mfVWCopKNdHkJqxE16Eeonz_");
post.addParameter("client_assertion_type","urn:ietf:params:oauth:assertion_type:saml2-bearer");
post.addParameter("client_assertion", Base64.encode(samlResponse.getBytes()));

 

 

with above data I am getting errot message :

( error=unsupported_response_type&error_description=response%20type%20not%20supported)

 

in reference link it is metioned 

client_assertion_type: The format of the assertion as defined by the authorization server. The value MUST be an absolute URL

 

I am confused about this part. The data I used is valid ? 


sberyozkinsberyozkin

I guess you are sending it to the wrong endpoint, should go to the access token endpoint