Jump to content

Single Sign-On has been disabled for this account


Recommended Posts

Hello,

I have a WHMCS install in which we're using the API to embed an order form in another application. With WHMCS 8x, we're using the CreateSsoToken API function to authenticate the user. This same code is working an another WHMCS install, both of which are on 8.1.3. Users/Clients are being created properly in both installs, but only in the other install are those users being redirected to the cart; in this one, I'm getting this error:
 

{"error":"access_denied","error_description":"Single Sign-On has been disabled for this account."}


I did find this community post about the error, but we're not using cPanel application links, I double checked the value in the tblclients.uuid table, and ensured the client had SSO enabled.

Here is the function we're using to build the SSO token request. This section, and the callwhmcsapi() function it references, are the same between this install (that's throwing the above error) and the other install that's working fine. I've also double checked that this is the proper path for the product.
 

function whmcssso($client){
  $params['client_id'] = $client['client_id'];
  $params['destination'] = 'sso:custom_redirect';
  $params['sso_redirect_path'] = 'cart.php?a=add&pid=1';
  $result = callwhmcsapi("CreateSsoToken",$params);
  return $result['redirect_url'];
}


Any help would be appreciated, thank you.

Best,

Link to comment
Share on other sites

2 hours ago, towens said:

Hello,

I have a WHMCS install in which we're using the API to embed an order form in another application. With WHMCS 8x, we're using the CreateSsoToken API function to authenticate the user. This same code is working an another WHMCS install, both of which are on 8.1.3. Users/Clients are being created properly in both installs, but only in the other install are those users being redirected to the cart; in this one, I'm getting this error:
 


{"error":"access_denied","error_description":"Single Sign-On has been disabled for this account."}


I did find this community post about the error, but we're not using cPanel application links, I double checked the value in the tblclients.uuid table, and ensured the client had SSO enabled.

Here is the function we're using to build the SSO token request. This section, and the callwhmcsapi() function it references, are the same between this install (that's throwing the above error) and the other install that's working fine. I've also double checked that this is the proper path for the product.
 


function whmcssso($client){
  $params['client_id'] = $client['client_id'];
  $params['destination'] = 'sso:custom_redirect';
  $params['sso_redirect_path'] = 'cart.php?a=add&pid=1';
  $result = callwhmcsapi("CreateSsoToken",$params);
  return $result['redirect_url'];
}


Any help would be appreciated, thank you.

Best,

Are both installs exactly the same? Does the user have SSO enabled on this account?

Edited by yggdrasil
Link to comment
Share on other sites

1 hour ago, yggdrasil said:

Are both installs exactly the same? Does the user have SSO enabled on this account?

Hi,

Yes. The two installs are on the same version, have essentially the same settings, the same order form and template, and so on. The only thing different between them is cosmetic customization (name, logo, etc), and what servers they are on; even the two servers were configured almost identically. The account I am using to test does have SSO enabled.

Best,

Link to comment
Share on other sites

2 hours ago, towens said:

Hi,

Yes. The two installs are on the same version, have essentially the same settings, the same order form and template, and so on. The only thing different between them is cosmetic customization (name, logo, etc), and what servers they are on; even the two servers were configured almost identically. The account I am using to test does have SSO enabled.

Best,

Clearly there is something different between them, otherwise you would have the same behavior.

You might have the same pieces of software installed and some versions but maybe the PHP.ini settings are different just to name one example, or ones is saving sessions to memory, other to disks. Or maybe one is blocking some ports with a firewall and the other is not. Even a tiny difference can be make all the difference between the same software or application acting differently.

Technically it makes no sense if both are a replicate clone bit by bit that one installation would behave differently to the other. Your best shot is looking at the server logs on the server that experiences the issue and check for any errors. I would also start comparing the servers and WHMCS configs, something must be different in one of the systems, otherwise it would work exactly the same.

Did you try contacting WHMCS support?

Link to comment
Share on other sites

On 3/25/2021 at 5:47 PM, yggdrasil said:

Clearly there is something different between them, otherwise you would have the same behavior.

You might have the same pieces of software installed and some versions but maybe the PHP.ini settings are different just to name one example, or ones is saving sessions to memory, other to disks. Or maybe one is blocking some ports with a firewall and the other is not. Even a tiny difference can be make all the difference between the same software or application acting differently.

Technically it makes no sense if both are a replicate clone bit by bit that one installation would behave differently to the other. Your best shot is looking at the server logs on the server that experiences the issue and check for any errors. I would also start comparing the servers and WHMCS configs, something must be different in one of the systems, otherwise it would work exactly the same.

Did you try contacting WHMCS support?

 

I have not reached out to support yet, but I was able to get this more or less resolved. This was a fresh install, so re-installing a lower version of WHMCS 8x and then upgrading to the current version it fixed the issue. I will reach out to support shortly, when time comes to set up another install, to see if they have any ideas on why this may be happening.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated