Integration Guide
0 mins to read
MyGeotab SAML 2.0 SSO Integration Guide
Integration Guide
0 mins to read
Learn more about how MyGeotab supports Single Sign-On (SSO) user authentication via the SAML 2.0 specification, including the requirements and procedures for configuring an IdP application and preparing a MyGeotab database to accept authentication. Browse frequently asked questions and review solutions for common troubleshooting issues.
SAML 2.0 Integration Guide
July 2021
Updated: August 2023
MyGeotab (version 5.7.2101 and newer) supports Single Sign-On (SSO) user authentication via the SAML 2.0 specification with both Identity Provider (IdP)-initiated and Service Provider (SP)-initiated protocol bindings, including SAML authentication for Geotab Drive and the MyGeotab mobile application.
This document describes Geotab requirements and procedures for creating and configuring an IdP application, preparing a MyGeotab database to accept authentication from that IdP, configuring MyGeotab users for SAML authentication, as well as frequently asked questions and troubleshooting guidance.MyGeotab supports user authentication using SAML 2.0 only, as described in this document. OpenID Connect (OIDC), Secure Web Authentication, OAuth 2.0, Artifact Resolution, Artifact Binding, or other methods are not supported.
Because SAML is a published standard, this document assumes that authentication integration will work with any IdP that offers SAML as an SSO method. Where possible, any settings referenced will include a generic descriptive name and the corresponding SAML element name as it would appear in a SAML assertion. Settings where a particular IdP vendor uses a sufficiently different term are also noted.
As of this update (August, 2023), example basic configurations are provided at the end of this document for the Microsoft Azure, Okta, and Google Workspace identity providers. The examples are all suitable for single-database access to the my.geotab.com federation via a single application, and can be seen here.
Successful SAML 2.0 integrations require the following:
Within the IdP user interface, do the following to initiate the creation of a new application via its Create App Integration/New Application or similar function:
Advanced SAML settings typically function correctly with their default IdP settings. Two items of note are as follows:
* NOTE: Specifying the saml2:Issuer value is completely optional for user function specific needs, and no additional recommendation applies.
Configure additional IdP attributes as follows:
After the attributes and settings above are completed you should be at the point where the application integration can be saved/completed. If prompted for publication/feedback, answers indicating that you are adding an internal application for internal use will complete the process. Ensure the following:
* NOTE: This is called “Azure AD Identifier” in Microsoft Azure.
* NOTE: Some customers have offered conflicting reports that one worked when the other did not.
Do the following as an administrator user in the MyGeotab database:
Upload your properly formatted .cer file. You will see a message indicating “The certificate key file <name of your file>.cer has been accepted” message.
* NOTE: This indicates a successful file load only — file contents are not validated.
MyGeotab accounts need to be configured for SAML authentication in order for this integration to function.
✱ NOTE: The MyGeotab Certificate file must be successfully uploaded prior to completing this procedure.
Do the following to configure a MyGeotab user for SAML authentication:
Because of the risk of temporarily losing access to a user account during the initial testing of authentication integration, it is highly recommended that a test user is created in both MyGeotab and the IdP to confirm the function before rolling-out to active users. Likewise, a Basic authentication administrator user should always exist as a backup in the event of any catastrophic failure (e.g. loss of access to IdP function, certificate invalidation, accidental deletion of IdP application, etc.).
The Bulk Edit Add-in tool is recommended for operating on multiple users in a database, with the option to set SAML Authentication with an installed certificate. See How do I access the new Bulk Edit Add-In? On the Geotab Community for more information about installing the Add-in for your environment.Modification of users is also possible via the Geotab API interface as documented in the MyGeotab SDK. Specific procedures are beyond the scope of this document, with the exception of noting the existence of the following entities and entity properties:
A sample Geotab SDK Runner API call to change a user from Basic to SAML via configuration of userAuthenticationType and issuerCertificate is as follows:
api.multiCall([["Get",{
"typeName": "User",
search: {name: "May282021User@nomail.com"} /*replace with name of actual user*/
}],],
function(results)
{ var SAMLUser = results[0] && results[0][0] ? results[0][0] : null;
if (SAMLUser){
SAMLUser.userAuthenticationType = "SAML";
SAMLUser.issuerCertificate = {
id : "a6mATltOsVUGge8CjPyoPfQ"}; /*use ID of actual certificate*/
api.call("Set",{
typeName : "User",
entity : SAMLUser}),
console.log("User \"" + SAMLUser.name + "\" given certificate \"" + SAMLUser.issuerCertificate.id +"\"");}
else {
console.log("User is not found!");
}},
console.error);
Once you have the Integration Setup completed, you should now test the SAML 2.0 authentication process.
Do the following:
Result: Browser is logged onto MyGeotab as the specified user.
Do the following:
Result: The browser window opens a new window/tab with the IdP login URL, where a successful login results in opening the MyGeotab UI.
Do the following:
Result: The browser window opens a new window/tab with the IdP login URL, where a successful login results in opening the Geotab Drive UI.
! IMPORTANT: For all other authentication issues, contact Geotab support (or other relevant contact) indicating the problem encountered, the IdP used, the Geotab database, the number of users impacted, an example impacted user, and a copy of a SAML assertion captured in the network activity of the browser when the issue occurred. A copy of the certificate file used to install in the Geotab database would also be helpful.
Issue: User cannot be authenticated.
Symptom: JSON response at URL address https://my.geotab.com/apiv1/authenticateSaml?redirect=true indicates "Incorrect login credentials" with name "InvalidUserException" and code ‘-32000’.
Cause: Something about the provided SAML assertion does not match the expected combination of attributes required to complete user authentication.
Troubleshooting: All requirements in this document can be reviewed for completion in the relevant UIs. If the problem is not readily identified, install a browser SAML tracer add-in, or use the developer console to examine the sent SAML assertion. It should be identifiable as SAML from a header attribute.
Elements to examine in the assertion include the following:
It is also possible for issues with certificates or certificate trust relationships to exist. These would typically occur in situations where a previously correctly functioning integration suddenly failed for all SAML users. If no other cause is identifiable then it will be valid to see if replacing the certificate resolves the issue, or confirm its function with another SP if available,
Issue: User cannot be authenticated.
Symptom: Possible symptoms are IdP specific.
Cause: Unknown unless indicated by IdP, but most immediate suspects would be no assignment of application to user, or user violation of IdP specific sign-on policies limiting access by location, time of day, platform, etc. Troubleshooting: Log on to the IdP portal as the impacted user directly and try to launch the application — see if the error generated provides guidance.
Issue: SAML authenticated user is prompted for re-authentication when using “Open Link in New Tab” functionality within the MyGeotab UI, or when clicking an Add-in link opening a new tab or window to the Geotab UI.
Cause: SAML authenticated sessions are managed differently than Basic (password) sessions. New instances of the MyGeotab UI do not acquire stored tokens for SAML authenticated sessions, necessitating re-authentication via the Login URL.
Troubleshooting: Entering the username of the SAML authenticated user should complete the process immediately if the user has a current valid login at the IdP.
Q: Which browser extension/addon is able to capture SAML exchanges across multiple tabs and windows, and provide both SAML decode assertion and Summary views?
A: The following browser extensions are recommended:
Q: Is Geotab an SP for any other SSO methods other than SAML 2.0?
A: No. Geotab currently only supports SP HTTP-Redirect with IdP HTTP-POST binding interactions.
Q: Does Geotab support outbound SAML integration, whereby Geotab is the IdP?
A: No. Geotab understands the importance of supporting this type of configuration and is looking into becoming an IdP for an industry standard SSO implementation. OAuth will likely be the initial focus.
Q: Does Geotab support SP initiated SAML login whereby users can be redirected from the MyGeotab landing page to the login page of the IdP?
A: Yes. This functionality is available in MyGeotab version 2101 and up.
Q: Does Geotab implement any restrictions on user login via SAML, such as user location, platform, time of day, directory group membership, requirement for Multi-Factor Authentication, etc.?
A: Geotab does not implement such restrictions directly, and will accept any otherwise valid SAML assertion sent by the IdP. Any sign-on policy implemented at the IdP (or at the directory via the IdP, or by another module integrated with the IdP) that will prevent that assertion from being sent will also prevent a login to MyGeotab from succeeding.
Q: Is it possible to edit a MyGeotab Certificate once it has been uploaded to the database?
A: Yes. This functionality is available for MyGeotab version 2101 and up. Opening an installed certificate in the UI now exposes a “Change certificate” option that allows a new certificate file to be uploaded to allow the contained key to be extracted and associated with the existing certificate entity.
Q: Can both Basic and SAML Authentication be assigned to a MyGeotab account?
A: No. A User can only be assigned to a single authentication type. In some cases, it may make sense to create two MyGeotab User accounts for a user.
Q: In which circumstances would we not want to use the default Application Consumer Service (ACS) URL?
A: There are two specific circumstances where you would not want to use https://my.geotab.com/apiv1/authenticateSaml?redirect=true as the ACS URL:
https://<Geotab federation URL>/apiv1/authenticateSaml
. Q: Is it possible to add a certificate via the Geotab SDK API?
A: Yes. What should be sent as the “key” property of an Add() method for a Certificate entity is actually a string containing the entire contents of an X.509 certificate file converted from ASCII to hexadecimal. The sent “key” is subsequently converted on receipt to the value stored as “key” for the entity created in the database. The value sent is the correct format if it begins with “2D2D2D2D2D424547494E204345525449” and ends with “43455254494649434154452D2D2D2D2DA” (i.e. “-----BEGIN CERTI” and “CERTIFICATE-----”).The following sample code would be executed in the SDK Runner to add a certificate to a database. For actual use, replace all example property values with those applicable for your IdP application and certificate:
api.call("Add", {
typeName : "Certificate",
entity : {
"issuer": "IdPIssuerIDForGeotab",
"logInUrl": "https://loginurl.myidp.com",
"key": "[X.509 certificate here]",
"id": null
}
}, function () {
console.log("Added certificate ");
}, console.error);
It is also possible to update a Certificate — if expiring, for example — to a new key property via a multi-call to Get() a certificate with a Set() on the entity to replace the key as submitted in the Add() example. This example would accomplish a change to Issuer or key for the certificate installed in the example above, but as provided would execute and change nothing, as it is the same certificate).
api.call ("Get",{
"typeName": "Certificate",
search: {issuer: "IdPIssuerIDForGeotab"} /*replace with actual issuer*/
},
function(results)
{ var SAMLCert = results[0] && results[0][0] ? results[0][0] : null;
if (SAMLCert){
SAMLCert.issuer = "IdPIssuerIDForGeotab"; /*Change here if Issuer ID also changing*/
SAMLCert.key = "[X.509 certificate here]"
api.call("Set",{
typeName : "Certificate",
entity : SAMLCert}),
console.log("Certificate\"" + SAMLCert.issuer + "\" given key \"" + SAMLCert.key +"\"");}
else {
console.log("Certificate is not found!");
}}, console.error);
Assistance beyond the scope of this document may be required for advanced integration scenarios involving multiple applications to accommodate username variances or multiple databases, or if troubleshooting assistance is required beyond the tips in the Troubleshooting section. If Geotab assistance is needed to complete a successful SAML integration, the list of items below will ensure efficient progress on the effort.
As many as three roles can be filled by a single person, but each role should be represented on the call(s). If implementation is urgent then it is vital that all of the following roles are available from start to end, including via email and for any related calls.
Useful information relevant to the configuration:
URL when signed in (i.e. https://my###.geotab.com/<databasename>).
The sample configurations below describe streamlined settings applicable to most single database integrations for databases hosted on the my.geotab.com federation, for the Azure, Okta, and Geotab Workspace identity providers.
Note that a gallery application exists at Microsoft that can be used as an alternative to these instructions. The Microsoft Learning Center guide to this process can be found at https://learn.microsoft.com/en-us/entra/identity/saas-apps/mygeotab-tutorial.Application Configuration: Using Enterprise Applications -> New application -> Create your own application with the “Integrate any other application you don't find in the gallery (Non-gallery)” option, select ‘Set up single sign on” with the SAML option.Then complete configuration with ACS, Entity ID, and the Email attribute as described in IdP Application Configuration as shown below:
Note that Azure’s optional ‘Sign on URL’ property forces SP-initiated login when IdP-initiated login is attempted. To use this functionality the value would be the MyGeotab login URL (i.e. https://my.geotab.com).MyGeotab Configuration:
With reference to the Azure user interface below:
Additional Azure considerations:An application Entity ID must be unique within an Azure tenant, limiting Azure to a single application which can function via Service Provider initiated login.An IdP Issuer value must be unique within a MyGeotab database. The Azure AD Identifier (Issuer) is not configurable or set on a per application basis in Azure, limiting MyGeotab to a single Certificate from any Azure tenant within that database.
Regarding the Email attribute, it should be created by:
Application Configuration Create service provider details with reference to this image, noting that ACS, Entity ID, and the Email attribute should be entered as described in IdP Application Configuration:MyGeotab ConfigurationUse “Option 2” from the popup displayed from the ‘DOWNLOAD METADATA’ menu link and reference image below to complete MyGeotab Certificate Installation: Issuer value in MyGeotab is the referenced Entity ID
Login URL value in MyGeotab is the referenced SSO URL
The certificate must be downloaded as a file in order to upload into the MyGeotab Certificate.
Application Configuration: Begin by selecting ‘Create App Integration’ with ‘Sign-in method SAML 2.0’, provide an application name, then at SAML Settings. Then complete configuration with ACS, Entity ID, and the Email attribute as described in IdP Application Configuration as shown below:
MyGeotab Configuration:When the application has been created with the ‘Finish’ option, select the “View SAML Setup Instructions” link to load the “How to Configure SAML 2.0 for <app name> Application” page, using the image below to complete
MyGeotab Certificate Installation where: Issuer value in MyGeotab is the referenced Identity Provider Issuer in Okta (item 2).
Login URL value in MyGeotab is the referenced Identity Provider Single Sign-On URL (item 1) in Okta.
The certificate must be downloaded as a file in order to upload into the MyGeotab Certificate.