Jitbit installation
Database
The SQL scripts in the sql subfolder of the Jitbit download need to be modified before use. Do not run create_db.sql. From the table scripts, run only the statements that create the application user and tables; do not run database-switching commands or commands that write to master.
Create the database
- In
rg-servicedesk, select SQL Server → Create Database. - Under Basics, set:
- Database name:
corpJitbitServiceDeskDB - Use SQL elastic pool: Yes
- Elastic pool:
ccmServiceDesk - Backup storage redundancy: Zone-redundant
- Database name:
- Under Networking, add your current client IP address. This is for Query Editor access and does not affect web app access rules.
- Under Security, set Microsoft Defender and Ledger to No.
- Under Additional settings, select No existing data and Default Collation.
- Create the database.
Create the tables and application user
- Open the database and select Query Editor.
- Sign in using SQL authentication. Retrieve the
ccmjitbitservicedesk-server-admincredentials from Bitwarden. - Run the table-creation statements from
CreateTables.sql. - In a new query, create the application user and assign its roles:
CREATE USER JitbitHelpDeskUser
WITH PASSWORD = '<replace-with-secret-from-Bitwarden>';
ALTER ROLE db_datawriter ADD MEMBER JitbitHelpDeskUser;
ALTER ROLE db_datareader ADD MEMBER JitbitHelpDeskUser;
App service
Create the web app
- Create a Web App with these settings:
- Name:
ccm-corp-jitbit-servicedesk - Publish: Code
- Stack: .NET 10
- Operating system: Linux
- Region: Australia East
- Name:
- Under Deployment, disable Continuous deployment and Basic authentication.
- Under Networking, turn Public access on and Virtual network integration off.
- Under Monitor, enable Application Insights and select
ccmJitbitInsights. Turn Defender off. - Create the web app.
Deploy the app
Extract the initial ZIP, then create a ZIP containing only the files inside the helpdesk folder. Upload that ZIP through the Deployment Centre.
Configure the database connection
In Settings → Environment Variables, create DBConnectionString. Use the database server, database name, user ID, and secret for your environment. Keep the real password in Bitwarden or the app setting; do not put it in documentation.
Server=tcp:<server>.database.windows.net,1433;Initial Catalog=<database-name>;Persist Security Info=False;User ID=JitbitHelpDeskUser;Password=<replace-with-secret>;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=60;
The timeout is set to 60 seconds to allow for the database waking from a cost-saving idle state.
In Settings → Configuration → Stack Settings, select .NET 10 and set the startup command to dotnet HelpDesk.dll.
Snipe-IT API integration
Asset notes are recorded as activities. Retrieve them with the Snipe-IT activity endpoint:
$activityUri = 'https://asset.manage.ccmschools.edu.au/api/v1/reports/activity?item_type=asset&item_id=581&action_type=note%20added'
Invoke-RestMethod -Method Get -Headers $headerSIT -Uri $activityUri
The note content is available in the note property. Helpdesk URLs can be recorded in this way.
Jitbit automation
When a ticket's Level 1 custom field changes to Devices & Equipment, configure Jitbit to send a webhook containing the ticket ID to the Azure Runbook.
Azure Runbook
The runbook should:
- Retrieve the ticket ID from the webhook.
- Construct the ticket URL.
- Connect to Jitbit and retrieve any assets linked to the ticket.
- Connect to Snipe-IT and retrieve notes on those assets.
- Add the ticket URL as an asset note if no existing note references it.