Azure AD Live Lookup for HelpSpot is a command line application that allows for livelookups against Azure AD using the Microsoft Graph API. It has two options livelookup
(exact matching queries ) and livelookupfuzzy
(partial matching queries).
This application needs to be copied to a directory on your HelpSpot server that the web server process can execute and access. It will be called from HelpSpot via a PHP exec()
function call.
Requires: PHP 8.0
Download the latest release from https://github.com/helpspot/AzureLiveLookup/releases/latest/download/AzureLiveLookup.zip
This application requires a .env file where your Microsoft Client settings are stored. To create this env file we'll need to follow these steps generate the file and then set up an enterprise app in Azure AD:
- Copy the .env.example file to .env
- Copy your Microsoft Tenant ID to the
MS_TENANT_ID
setting. To find your Microsoft Tenant ID, log in to Microsoft Azure. From the menu, selectAzure Active Directory > Overview
. You can find the Tenant ID within theOverview
tab. - In Azure Active Directory click on
App registrations
. - Click on
New Registration
. - Give the Application a name and select
Accounts in this organizational directory only
for theSupported account type
. - Copy the
Application ID
to theMS_CLIENT_ID
variable in your.env
file. - Select
API permissions
and add theUser.Read
andUser.Read.All
permissions. - Select
Certificates and Secrets
and create a newClient Secret
. - Copy the
Value
to theMS_CLIENT_SECRET
variable in your.env
file.
The default search that is performed in this example needs the User.Read, User.Read.All and User.ReadBasic.All api permissions. These permissions are managed under the API permissions
tab of your app registration.
In HelpSpot:
- Navigate to
Admin > Settings > Live Lookup
- Give the new source a name and select
Command Line
for theLookup Via
setting. - The
Path to Script
settings needs the full path to your php cli executable followed by the full path to your azurelivelookup app with the parameterlivelookup
orlivelookupfuzzy
.
Example:
/usr/bin/php8.0 /var/www/helpspot/public/custom_code/AzureLiveLookup/azurelivelookup livelookup
- Save your settings.
Your Live Lookup source will now be available in the request view. By default the Live Lookup integration searched via email address for matches in your directory.
app/Commands/Livelookup.php
- Contains theusers()
function that performs the search against Azure AD. You can customize the search string used along with the fields returned by changing the$query
variable in that function.resources/views/livelookup.blade.php
- Contains the XML output that is returned from the command. This can be customized using Laravel Blade formatting.
For full documentation, visit laravel-zero.com.
Azure AD Live Lookup for HelpSpot is an open-source software licensed under the MIT license.