Ask for how to get user profile after callback


My application is using Single Sign On (SSO) Service from IBM Bluemix. This is the credentials info of my SSO Service:

“SingleSignOn”: [
“credentials”: {
“secret”: “HKROXXXxXX”,
“tokenEndpointUrl”: “”,
“authorizationEndpointUrl”: “”,
“issuerIdentifier”: “”,
“clientId”: “YgFC7XXXXX”,
“serverSupportedScope”: [
“syslog_drain_url”: null,
“volume_mounts”: [],
“label”: “SingleSignOn”,
“provider”: null,
“plan”: “professional”,
“name”: “VA-Admin-Console-R1-SSO”,
“tags”: [

From my Application, I redirect to Login page of IBM like URL:


In my Call Back function, I can get parameter “code” from callback URL (http://localhost/callback?scope=openid&code=bngM6aV5cYHAvhv7wLAM5QSWFDARn7).

From there, I want to to get user profile. I have try to use AJAX to get user profile:

var settings = {
“async”: true,
“crossDomain”: true,
“url”: “”,
“method”: “POST”,
“headers”: {
“content-type”: “application/x-www-form-urlencoded”,
“authorization”: “Basic RXhhbXBsZV9BcHBJRDpWUFlndEdXRlRvYVpZSUNTRzhJeVZFV000bUZicGpsU2t4RlRRbzlySkRGZDdzckc=”,
“cache-control”: “no-cache”
“data”: {
“client_secret”: “HKROXXXxXX”,
“grant_type”: “authorization_code”,
“redirect_uri”: “http://localhost/callback”,
“code”: “bngM6aV5cYHAvhv7wLAM5QSWFDARn7”,
“client_id”: “YgFC7XXXXX”

$.ajax(settings).done(function (response) {

From ajax post above, I have tried to use the “code” from callback, but I’ve got an error message:

– 500 Error: Failed to establish a backside connection

I’ve got stuck here and don’t know how to get user profile from SSO. Please help me.


Leave a Reply