MS Teams Integration

Microsoft Teams is a widely adopted collaboration platform in Indian organizations, particularly those using Microsoft 365. Udyamo HRMS integrates with MS Teams through a dedicated bot that brings key HR actions — leave applications, overtime requests, and attendance — directly into the Teams interface. This chapter covers how to install, configure, and use the Udyamo HRMS Teams bot.


What You Will Learn

  • What the Udyamo HRMS Teams bot can do
  • How to install the bot in your MS Teams environment
  • How the bot authenticates with Udyamo HRMS (token-based)
  • How to submit a leave request from Teams
  • How to request overtime from Teams
  • How to view attendance information from Teams
  • How adaptive cards provide interactive forms
  • How to troubleshoot common integration issues

Prerequisites

Required: Your organization must have a Microsoft Teams subscription (Microsoft 365 Business Basic or higher).

Required: You must have an Administrator role in Udyamo HRMS to install and configure the Teams integration.

Required: Employees must have matching email addresses in both Udyamo HRMS and Microsoft 365.


Overview of the MS Teams Bot

The Udyamo HRMS bot for Microsoft Teams provides a conversational interface for common HR actions. Instead of opening the Udyamo HRMS web application, employees can perform quick tasks directly in their Teams chat window.

Bot Capabilities

CapabilityDescriptionAvailable To
Submit Leave RequestApply for leave by specifying the category, dates, and reason — all within TeamsAll employees
Request OvertimeSubmit an overtime request with date, hours, and justificationAll employees
View AttendanceCheck today's attendance status, check-in/out time, and recent attendance summaryAll employees
Leave Approval NotificationsReceive a notification in Teams when a leave request needs approvalManagers
Overtime Approval NotificationsReceive a notification when an overtime request needs approvalManagers
Approval ActionsApprove or reject leave and overtime requests directly from the Teams notificationManagers

How the Bot Communicates

The bot uses adaptive cards — interactive, structured UI elements within Teams messages. Adaptive cards allow the bot to render forms, buttons, and data tables directly in the chat, providing a richer experience than plain text messages.

Udyamo HRMS bot in Teams — overview


Installing the Udyamo HRMS Bot in Teams

Step 1: Obtain the Teams App Package

  1. Log in to Udyamo HRMS as an administrator.
  2. Navigate to Settings > Integrations > Microsoft Teams.
  3. Click Download Teams App Package.
  4. A .zip file containing the Teams app manifest is downloaded to your device.

Tip: The app package is a standard Teams app manifest that describes the bot, its permissions, and its capabilities. It does not contain any sensitive data.

Step 2: Upload to Microsoft Teams Admin Center

If your organization uses the Teams Admin Center for app management:

  1. Log in to the Microsoft Teams Admin Center.
  2. Navigate to Teams apps > Manage apps.
  3. Click Upload new app.
  4. Select the .zip file downloaded from Udyamo HRMS.
  5. Review the app details and permissions.
  6. Click Allow to make the app available to your organization.

Step 3: Alternative — Sideload for Testing

For smaller organizations or testing purposes, you can sideload the app directly:

  1. Open Microsoft Teams (desktop or web).
  2. Click the Apps icon in the left sidebar.
  3. Click Manage your apps at the bottom.
  4. Click Upload an app > Upload a custom app.
  5. Select the .zip file.
  6. Click Add to install the bot.

Warning: Sideloading must be enabled in your Teams admin settings. If the option is not available, contact your Microsoft 365 administrator.

Step 4: Configure the Integration in Udyamo HRMS

  1. Navigate to Settings > Integrations > Microsoft Teams in Udyamo HRMS.
  2. Enter the required configuration details:
FieldDescriptionRequired
Bot IDThe Microsoft Bot Framework bot ID (from the Azure Bot registration)Yes
Bot SecretThe bot's client secret for token-based authenticationYes
Tenant IDYour Microsoft 365 tenant IDYes
Service URLThe Teams service URL for sending proactive messagesYes
  1. Click Save.
  2. Click Test Connection to verify the bot can communicate with Teams.

Teams integration configuration in Udyamo HRMS

Tip: The Bot ID and Bot Secret are obtained when you register a bot with the Azure Bot Service. Your IT administrator may need to complete this step if it has not been done already.


Token-Based Authentication

The Udyamo HRMS Teams bot uses token-based authentication to securely link a Teams user to their Udyamo HRMS employee account.

How Authentication Works

  1. When an employee first interacts with the bot in Teams, the bot sends an authentication card asking the employee to sign in.
  2. The employee clicks Sign In on the adaptive card.
  3. A browser window opens, directing the employee to the Udyamo HRMS login page.
  4. The employee logs in using their Udyamo HRMS credentials (email/password, SSO, or OTP).
  5. Upon successful login, Udyamo HRMS generates a secure token and returns it to the bot.
  6. The bot stores the token for the Teams user's session.
  7. All subsequent bot interactions are authenticated using this token.

Token Details

PropertyValue
Token typeBearer token
ExpiryConfigurable (default: 24 hours)
RefreshAutomatic refresh when the token nears expiry, if the user has an active Teams session
RevocationToken is revoked when the employee's Udyamo HRMS account is deactivated

Warning: The authentication token links a specific Teams user to a specific Udyamo HRMS account. If an employee uses a shared Teams account (not recommended), the bot will associate actions with whichever Udyamo HRMS account authenticated last.

Bot authentication flow


Using the Bot: Submit a Leave Request

Employees can apply for leave directly from Microsoft Teams without opening the Udyamo HRMS web application.

Step-by-Step: Apply for Leave in Teams

  1. Open Microsoft Teams.
  2. Find the Udyamo HRMS bot in your chat list (or search for it in the Apps section).
  3. Type "apply leave" or "leave" in the chat.
  4. The bot responds with an adaptive card containing a leave application form:
FieldDescription
Leave CategoryDropdown to select the leave type (Casual Leave, Sick Leave, etc.)
Start DateDate picker for the first day of leave
End DateDate picker for the last day of leave
Half DayToggle if applying for a half day
ReasonText field for the leave reason
  1. Fill in the form fields on the adaptive card.
  2. Click Submit.
  3. The bot confirms the submission and shows the leave request details.
  4. The leave request appears in Udyamo HRMS with Pending status, just as if it had been submitted through the web application.

Leave request adaptive card in Teams

Tip: The leave categories shown in the Teams form match the leave categories configured in Udyamo HRMS. If a category is missing, check your leave category settings in the web application.


Using the Bot: Request Overtime

Employees who need to log overtime hours can submit requests through the Teams bot.

Step-by-Step: Request Overtime in Teams

  1. Open the Udyamo HRMS bot chat in Teams.
  2. Type "overtime" or "request overtime".
  3. The bot responds with an overtime request adaptive card:
FieldDescription
DateThe date of the overtime work
HoursNumber of overtime hours to claim
ReasonJustification for the overtime work
  1. Fill in the details.
  2. Click Submit.
  3. The bot confirms the submission.
  4. The overtime request appears in Udyamo HRMS for manager approval.

Using the Bot: View Attendance

Employees can quickly check their attendance status without leaving Teams.

Step-by-Step: Check Attendance in Teams

  1. Open the Udyamo HRMS bot chat in Teams.
  2. Type "attendance" or "my attendance".
  3. The bot responds with an attendance summary card showing:
InformationDescription
Today's StatusPresent, Absent, On Leave, or Not Checked In
Check-In TimeTime of today's check-in (if recorded)
Check-Out TimeTime of today's check-out (if recorded)
Hours WorkedTotal hours worked today
This MonthSummary — present days, absent days, leave days, late arrivals

Attendance summary card in Teams

Tip: The attendance data shown by the bot is read from the same database as the web application. Any corrections made in the web application are immediately reflected in the bot's responses.


Manager Notifications and Approvals

The Teams bot also serves managers by delivering actionable notifications for leave and overtime requests.

Leave Approval Notifications

When an employee submits a leave request, the reporting manager receives a Teams notification:

  1. The bot sends an adaptive card to the manager's chat with the following details:
    • Employee name
    • Leave category
    • Date range
    • Reason
    • Current leave balance
  2. The card includes two action buttons: Approve and Reject.
  3. The manager clicks Approve or Reject directly on the card.
  4. If rejecting, an optional text field appears for the rejection reason.
  5. The bot confirms the action and notifies the employee of the decision.

Overtime Approval Notifications

Similar to leave approvals:

  1. The manager receives an adaptive card with overtime request details.
  2. The card includes Approve and Reject buttons.
  3. The manager takes action directly from Teams.

Manager approval card in Teams

Tip: Approving or rejecting through the Teams bot has the exact same effect as doing it through the Udyamo HRMS web application. The action is logged in the system's audit trail.


Adaptive Cards Reference

Adaptive cards are the primary UI mechanism for the Teams bot. They provide structured, interactive content within Teams messages.

What Adaptive Cards Support

ElementDescriptionUsed For
Text blocksDisplay text with formattingShowing information, instructions
Input fieldsText boxes, date pickers, dropdownsCollecting user input (leave dates, reasons)
Action buttonsClickable buttons that trigger actionsSubmit, Approve, Reject, Cancel
Fact setsKey-value pairs displayed in a table formatAttendance summary, leave balance
ImageDisplay imagesAvatars, status icons

Card Types Used by Udyamo HRMS Bot

CardTriggerContent
Authentication CardFirst interaction with the botSign-in button and instructions
Leave Application CardEmployee types "apply leave"Form with leave category, dates, reason
Overtime Request CardEmployee types "overtime"Form with date, hours, reason
Attendance Summary CardEmployee types "attendance"Today's status and monthly summary
Leave Approval CardEmployee submits a leave requestRequest details with Approve/Reject buttons (sent to manager)
Overtime Approval CardEmployee submits an overtime requestRequest details with Approve/Reject buttons (sent to manager)
Confirmation CardAfter any submission or actionSuccess/failure message with details

Bot Commands Reference

CommandAliasesResponse
helphi, helloDisplays available commands and a brief description of each
apply leaveleave, request leaveOpens the leave application adaptive card
overtimerequest overtime, otOpens the overtime request adaptive card
attendancemy attendance, statusDisplays the attendance summary card
balanceleave balanceShows current leave balances by category
sign outlogoutRevokes the bot's authentication token for the current user

Setting Up the Integration — Summary Checklist

Use this checklist to ensure all setup steps are completed:

StepActionStatus
1Register a bot with Azure Bot Service
2Download the Teams app package from Udyamo HRMS
3Upload the app package to Teams Admin Center (or sideload)
4Enter Bot ID, Bot Secret, and Tenant ID in Udyamo HRMS
5Test the connection from Udyamo HRMS settings
6Have a test employee authenticate with the bot in Teams
7Test leave submission, overtime request, and attendance query
8Test manager notification and approval flow
9Roll out to the organization via Teams app policy

Troubleshooting

Common Issues and Solutions

ProblemPossible CauseSolution
Bot does not respondBot is not installed or authentication has expiredReinstall the bot or type "sign out" and re-authenticate
"Authentication failed"Token has expired or employee account is deactivatedRe-authenticate by clicking Sign In; check account status in Udyamo HRMS
Leave categories not showingLeave module not enabled or no categories configuredEnable the Leave feature and configure categories in Udyamo HRMS
Manager not receiving approval notificationsReporting manager not assigned to the employeeAssign a reporting manager in the employee's profile
Bot not found in TeamsApp not uploaded or not approved by Teams adminUpload the app package or contact your Microsoft 365 admin
Adaptive card buttons not workingTeams client version too oldUpdate Microsoft Teams to the latest version
"Service URL invalid" errorIncorrect service URL in Udyamo HRMS configurationVerify the service URL matches the Teams environment (commercial, GCC, etc.)
Bot works for some users but not othersInconsistent email matchingEnsure all employees have matching emails in both Teams and Udyamo HRMS

Checking Bot Logs

  1. Navigate to Settings > Integrations > Microsoft Teams in Udyamo HRMS.
  2. Click View Logs (if available).
  3. Review recent bot interactions for errors or authentication failures.

Security Considerations

ConsiderationDetails
Data in transitAll communication between Teams and Udyamo HRMS is encrypted via HTTPS/TLS
Token storageAuthentication tokens are stored securely and scoped to individual users
No password storageThe bot never stores or transmits Udyamo HRMS passwords — authentication is token-based
Audit trailAll actions performed via the bot are logged in Udyamo HRMS just like web actions
DeprovisioningWhen an employee is terminated in Udyamo HRMS, their bot token is automatically revoked

Best Practices

  1. Roll out in phases. Start with a pilot group to test the bot before deploying to the entire organization.
  2. Train employees on bot commands. Share the command reference so employees know what they can do.
  3. Ensure email consistency. The bot relies on email matching — mismatched emails will cause authentication failures.
  4. Monitor usage. Track how many employees use the bot vs. the web app to gauge adoption.
  5. Keep the Teams app updated. When Udyamo HRMS releases bot updates, download the new app package and upload it to Teams.
  6. Use the bot for quick actions. For complex tasks (e.g., salary configuration, report generation), continue using the web application.

What Comes Next

With security and integrations covered, the final part of the guide addresses subscription and license management. Proceed to Chapter 47: License Management.