Autologin in suitecrm

Hi Guys,

I want to apply autologin into my system as i have different system(which is using php) so i want an example through which I can get directly login into suitecrm from my system

It will be great if anyone of can help me with this

@skynetdev, Hi!
Do you want open SuiteCRM in frame of different system or connect SuiteCRM with different system?

We have a backend from which we will give a link(in menu) on clicking the linking user will be redirected to suitecrm and we want they should automatically login into the suitecrm.

As through user api we have maintain both user credentials(suitecrm user credentials and our system user credential) to be same

Do anyone have any idea how we can do this??

@skynetdev

  1. You can generate link from this template:
https://example.com/index.php?module=Users&action=Authenticate&login_module=<target module>&login_action=<target action>&user_name=<username>&username_password=<password>
  1. You can make your authentication method. See for example standard methods:
    modules/Users/authentication

May be another variant…

If single sign-on is what you’re after, SuiteCRM supports SAML and LDAP as backends. Probably your easiest option is to setup both to use one of those as the backend.

Developing your own authentication schemes is risky business, unless you really know what you’re doing. You probably could create some kind of scheme checking either POST or GET attributes from the backend as user clicks the link and base authentication on those, but I’d definitely advice against that - you’d most likely be creating a serious vulnerability and risking your customer data.

Hi, @TLi
How can SAML and LDAP help here?
I don’t see any problems with developing authentication method. For example now in SuiteCRM work don’t standard for SugarCRM two factor authentication. There was method EmailAuthenticate in SugarCRM v6 but it was broken and now SuiteCRM use another method FactorAuthFactory.

@p.konetskiy if SSO is what is needed, then those are the way to go. Both could be configured to autologin to new services once the user has logged in on the backend, so there would be no need to reinput passwords or at least the passwords would be the same.

We use SAML-based authentication between o365, SuiteCRM, Wordpress, Nextcloud and a few others, and the authentication will be seamless once logged in on the backend.

2 Likes

@TLi, OK thanks. SSO+SAML is a good decision.

1 Like

@TLi @p.konetskiy Thanks for the soltuion

BTW i have one more question can you please tell me how can we upload pdf/docx format file in leads section as currently it give option to upload only image file

@skynetdev
What is the “leads section” ?
Standard form of Leads module don’t support upload file.

Yes i know but through studio we can create new fields for uploading file

right now it give option to upload only images but I want to have pdf/docx format with this

@skynetdev
I think only manually without Studio.
You can take module Notes as an example.

  1. There are 3 fields in vardefs:‘filename’, ‘file_url’, ‘file_mime_type’ . Take them.
  2. Make language label.
  3. Only ‘filename’ you should add to edit and detail view forms.
  4. Copy function ‘action_editview’ from module/Notes/controller.php to module/Leads/controller.php

Just to let other visitors know that there is a FREE plugin available for SSO via GOOGLE on SuiteCRM Store.

HI How can I achieve SAML-based authentication between o365 and suitecrm is there a guide ?

Regards
Riaan

Not that I know of. It’s been a long time since we implemented that, but IIRC you got pretty far with guides integrating GApps and SuiteCRM. There were some quirks with Azure AD that had to be resolved with good ol’ trial-and-error, but I have no memory of what those were.