Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, March 28, 2024 
 
Integrated Logins with the SalesLogix 6.2 Provider  
Description:  SalesLogix version 6.2 introduced the ability for linking a SalesLogix user account to an account in the Active Directory or domain. This new ability allows a user to bypass the Sales Client login screen and automatically log in if they have successfully authenticated with the Active Directory or domain. These SalesLogix users will likely never know how to handle a SalesLogix login screen since they never even see one. As a SalesLogix developer, it is a great idea to provide this same ability in your own addon applications.

Category:  SalesLogix OLE DB Provider
Author:  Ryan Farley
Submitted:  9/24/2004
   
Stats: 
Article has been read 18167 times

Rating: - 4.7 out of 5 by 7 users
 

fiogf49gjkf0d
Integrated Logins with the SalesLogix 6.2 Provider

SalesLogix version 6.2 introduced the ability for linking a SalesLogix user account to an account in the Active Directory or domain. This new ability allows a user to bypass the Sales Client login screen and automatically log in if they have successfully authenticated with the Active Directory or domain. These SalesLogix users will likely never know how to handle a SalesLogix login screen since they never even see one. As a SalesLogix developer, it is a great idea to provide this same ability in your own addon applications.


Setting Up Integrated Logins

As I mentioned earlier, SalesLogix version 6.2 provides the ability to use an Active Directory account to authenticate users for SalesLogix. This is an easy thing to set up.

In the SalesLogix Administrator, simply select the user you would like to link to an Active Directory user account and bring up the user properties. You'll see a checkbox there to "Use Windows Authentication". See image below:



I've selected the SalesLogix user named "Ryan" and tied it to the user "Ryan" in the SUPERFREAK domain. Peice of cake. Now, if I log into Windows as SUPERFREAK\Ryan and launch the Sales Client, I won't even see a login screen. It just bypasses it completely. Chances are that the SalesLogix user account for "Ryan" has a password, but it doesn't matter. The Active Directory user account supercedes the SalesLogix authentication requirements. I've authenticated on the domain so I am let right into SalesLogix.

When I am creating new users in the Administrator, I can simply select the domain users I'd like to create accounts for and the SalesLogix user accounts are created and automatically tied to the domain accounts.


The SalesLogix Connection String

Let's cut to the chase. In a previous article on slxdeveloper.com, I analyzed the various parts of the SalesLogix 6.2 connection string (See Understanding the SalesLogix 6.2 Connection String). There are some changes you can make to the connection string to allow for using an Active Directory integrated login for your own application that uses a connection via the SalesLogix Provider.

To modify the connection string, you can simply remove the "User ID" and "Password" parameters and add "Integrated Security=True" to the connection string. Let's take a look at the complete string:

Provider=SLXOLEDB.1;Integrated Security=True;Initial Catalog=SALESLOGIX_EVAL;Data Source=MYSLXSERVER;
Extended Properties=PORT=1706;LOG=ON;Location=;Mode=ReadWrite


That's it. Nothing more to it. As long as the current Windows user is linked to a SalesLogix user account then your connection will be successful and you'll be logged in as normal. But what if the current user has not been linked to a SalesLogix user account? You'll get an "Authentication Failed" error back just as if the user had supplied the wrong password.


Using Integrated Security

So where and how would you use this? Chris Grant had a great idea to use it on a web server, for use with a web service, so you wouldn't have to store the username and password anywhere on the server such as in a config file. Of course doing this would require you to link the ASP.NET service account to a SalesLogix user.

Another option is on your own login screens. I recently posted an article that describes the process of creating a SalesLogix login screen (See Building a SalesLogix Login Screen). You could add a checkbox to the login screen to allow the user to login without supplying a username and password. If you wanted to make the end-user experience as close to using the Sales Client as possible, you could make your application first attempt an integrated login every time. If that succeeds you make a call to the slx_getUserInfo stored procedure to see who you're logged in as (ie: Which SalesLogix user). If it fails, then you present your user with the login screen. This is how the Sales Client uses integrated security. Take a look at the steps below performed by the Sales Client when a user launches SalesLogix.

SalesLogix Windows Authentication follows this simple functional workflow:
  • SalesLogix users are associated with Windows users in the Admin.
  • A windows user starts SalesLogix.
  • The (invisible) SalesLogix Login Dialog creates a connection using the SLX OLEDB Provider using a connection string with integrated security.
  • If the connection is successful, the invisible dialog then calls the slx_GetUserInfo stored procedure to get the SalesLogix user credentials and proceeds with the login process without ever showing the dialog.
  • If the connection fails, then the Login dialog becomes visible and the standard login process applies from this point forward.
Using this same logic in your own custom applications creates a natural and expected look and feel for the end-user.


Wrapping It Up

Using what is avilable to you with SalesLogix is all about enhancing the end-user experience and giving your SalesLogix addon a professional and polished look. Take the time to make the user's experience with your addon the best possible. To you, you'll be proud of the magic your application performs. To your end user, it will just be natural and how they would expect it to be.

Until next time, happy coding.
-Ryan


Updates

  • 9/24/2004 - Updated to add how to allow your custom application to automatically log in and then present login screen if integrated attempt failed. Also added steps that the Sales Client uses for logins. Thanks to Mike Spragg for the reminder.

 

About the Author

  Ryan Farley
(SalesLogix Business Partner)
Customer FX Corporation

fiogf49gjkf0d

Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix since 2001 and believes in sharing with the community. He loves C#, Javascript, Python, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

View Ryan's SalesLogix Mobile Seveloper Series
View Ryan's SalesLogix SData Developer Series
View Ryan's Git for the SalesLogix Developer series



View online profile for Ryan Farley
 

[ back to top] [ send to a friend]  

Rate This Article you must log-in to rate articles. [login here] 
 
Please log in to rate article.
 

Related Articles 
 - Building a SalesLogix Login Screen - Submitted by: Ryan Farley
 - Understanding the SalesLogix 6.2 Connection String - Submitted by: Ryan Farley

 

Comments & Discussion you must log-in to add comments. [login here] 
 
Author Article Comments and Discussion
Patricia Capuz
 

Re: Integrated Logins with the SalesLogix 6.2 Provider
Posted: 4/28/2011 3:50:57 PM
fiogf49gjkf0d

Very important Information.


I want to use this kind of authetication on external salelogix applications.


But a I have a question.  By this way I could get the SLX usercode and userid, but ...How do I get the saleslogix password?  for building valid connection string with slx username and password. I am testing in slx6.2.6


Thanks in advance,


Paty


 

 
Ryan Farley

slxdeveloper.com Site Administrator
slxdeveloper.com Forum Top 10 Poster!

Re: Integrated Logins with the SalesLogix 6.2 Provider
Posted: 4/28/2011 4:14:51 PM
fiogf49gjkf0d

Hi Paty,


The point of integrated security is that you don't need the user's login name and password. There's no way to get it from the connection since you're not providing it to the connection. Make sense?


-Ryan

 
 

       Visit the slxdeveloper.com Community Forums!
Not finding the information you need here? Try the forums! Get help from others in the community, share your expertise, get what you need from the slxdeveloper.com community. Go to the forums...
 



 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 3/28/2024 9:13:01 PM