Advanced Teams Configuration
Advanced Teams Configuration
This section covers advanced Teams configurations, enterprise policies, and customization options for Ohlala SmartOps.
🏢 Enterprise Teams Configuration
Teams App Policies
Configure organizational policies for SmartOps deployment:
App Setup Policies
Control how SmartOps appears for users:
# Create custom app setup policy
New-CsTeamsAppSetupPolicy -Identity "SmartOpsUsers" `
-AllowUserPinning $true `
-AllowSideLoading $true
# Add SmartOps to installed apps
$appList = New-Object -TypeName Microsoft.Teams.Policy.Administration.Cmdlets.Core.InstalledAppList
$app = New-Object -TypeName Microsoft.Teams.Policy.Administration.Cmdlets.Core.App
$app.Id = "your-app-id"
$appList.Add($app)
# Assign to users
Grant-CsTeamsAppSetupPolicy -Identity "user@domain.com" -PolicyName "SmartOpsUsers"
App Permission Policies
Control who can use SmartOps:
# Create permission policy
New-CsTeamsAppPermissionPolicy -Identity "AllowSmartOps" `
-DefaultCatalogAppsType AllowedAppList `
-GlobalCatalogAppsType AllowedAppList
# Add SmartOps to allowed apps
Set-CsTeamsAppPermissionPolicy -Identity "AllowSmartOps" `
-DefaultCatalogApps "your-app-id"
Teams Admin Center Configuration
Upload Custom App
- Go to Teams Admin Center
- Navigate to Teams apps → Manage apps
- Click Upload new app
- Upload your customized manifest
- Set app availability:
- Everyone - All users can install
- Specific users/groups - Controlled access
- No one - Admin installation only
Pre-install for Users
- Select the SmartOps app
- Go to Setup policies
- Add to relevant policies
- Users will see the app automatically
🎨 App Manifest Customization
Custom Branding
Create a branded experience for your organization:
{
"$schema": "https://developer.microsoft.com/json-schemas/teams/v1.16/MicrosoftTeams.schema.json",
"manifestVersion": "1.16",
"version": "1.0.0",
"id": "YOUR-APP-ID",
"packageName": "com.yourcompany.smartops",
"developer": {
"name": "Your Company IT",
"websiteUrl": "https://yourcompany.com",
"privacyUrl": "https://yourcompany.com/privacy",
"termsOfUseUrl": "https://yourcompany.com/terms"
},
"name": {
"short": "IT Assistant",
"full": "Your Company IT Infrastructure Assistant"
},
"description": {
"short": "AI-powered infrastructure management",
"full": "Manage AWS infrastructure through natural language commands"
},
"accentColor": "#0078D4",
"icons": {
"outline": "icon-outline.png",
"color": "icon-color.png"
}
}
Command Suggestions
Add predefined commands for better user experience:
"bots": [
{
"botId": "YOUR-APP-ID",
"scopes": ["personal", "team", "groupchat"],
"supportsFiles": false,
"isNotificationOnly": false,
"commandLists": [
{
"scopes": ["personal", "team", "groupchat"],
"commands": [
{
"title": "help",
"description": "Show available commands and examples"
},
{
"title": "status",
"description": "Check status of EC2 instances"
},
{
"title": "health",
"description": "Get health report for all instances"
},
{
"title": "costs",
"description": "Analyze EC2 costs and get optimization tips"
}
]
}
]
}
]
🔐 Security & Compliance
Resource Specific Consent (RSC)
Enable granular permissions for Teams and channels:
"webApplicationInfo": {
"id": "YOUR-AAD-APP-ID",
"resource": "api://your-domain.com/YOUR-APP-ID"
},
"authorization": {
"permissions": {
"resourceSpecific": [
{
"name": "TeamSettings.Read.Group",
"type": "Application"
},
{
"name": "ChannelSettings.Read.Group",
"type": "Application"
},
{
"name": "TeamMember.Read.Group",
"type": "Application"
}
]
}
}
Information Barriers
For organizations with information barriers:
-
Verify bot compliance
- Ensure bot respects information barriers
- Test cross-segment messaging restrictions
-
Configure scoped deployments
- Deploy separate bot instances per segment
- Use different Azure AD apps per segment
Data Loss Prevention (DLP)
Configure DLP policies for bot messages:
# Create DLP policy for SmartOps
New-DlpCompliancePolicy -Name "SmartOps DLP" `
-SharePointLocation "All" `
-TeamsLocation "All"
# Add rules for sensitive information
New-DlpComplianceRule -Name "Block Credentials" `
-Policy "SmartOps DLP" `
-ContentContainsSensitiveInformation @{Name="AWS Access Key";minCount="1"} `
-BlockAccess $true
🎯 Channel & Team Configuration
Add to Multiple Teams
Bulk deployment script:
# List of teams to add bot to
$teams = @(
"IT Operations",
"DevOps Team",
"Infrastructure Support"
)
foreach ($team in $teams) {
# Get team ID
$teamId = (Get-Team -DisplayName $team).GroupId
# Add app to team
Add-TeamsAppInstallation -AppId "YOUR-APP-ID" -TeamId $teamId
Write-Host "Added SmartOps to $team"
}
Channel-Specific Permissions
Configure different permissions per channel:
- General channel - Read-only status commands
- Operations channel - Full management capabilities
- Alerts channel - Notification-only mode
🔄 Update & Migration
Updating the App
When updating SmartOps:
- Update manifest version
"version": "1.1.0" // Increment version
- Upload new package
# Update app in Teams Admin Center
Update-TeamsApp -Id "YOUR-APP-ID" -Path "smartops-v1.1.zip"
- Notify users
- App updates automatically for users
- May require Teams restart
Migration from Older Versions
If migrating from previous bot:
- Export conversations (if needed)
- Update webhook URL in Azure Bot
- Test in pilot group before org-wide rollout
- Communicate changes to users
📊 Monitoring & Analytics
Teams Analytics
Monitor bot usage in Teams Admin Center:
- Go to Analytics & reports
- Select Apps usage
- Filter by SmartOps app
- View:
- Active users
- Message count
- Channel distribution
- Usage trends
Custom Telemetry
Add Application Insights for detailed tracking:
// In bot code
const appInsights = require('applicationinsights');
appInsights.setup('YOUR-INSTRUMENTATION-KEY')
.setAutoCollectRequests(true)
.setAutoCollectPerformance(true)
.start();
// Track custom events
appInsights.defaultClient.trackEvent({
name: "CommandExecuted",
properties: {
command: "health",
user: context.activity.from.id,
team: context.activity.channelData?.team?.id
}
});
🚀 Advanced Features
Adaptive Cards
Create rich interactive experiences:
{
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.4",
"body": [
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "EC2 Instance Control",
"weight": "Bolder",
"size": "Medium"
},
{
"type": "ActionSet",
"actions": [
{
"type": "Action.Submit",
"title": "Start Instance",
"data": { "action": "start", "instanceId": "i-1234567890" }
},
{
"type": "Action.Submit",
"title": "Stop Instance",
"data": { "action": "stop", "instanceId": "i-1234567890" }
}
]
}
]
}
]
}
Proactive Messaging
Send alerts without user prompts:
// Store conversation reference
const conversationRef = TurnContext.getConversationReference(context.activity);
// Send proactive message later
await adapter.continueConversation(conversationRef, async (context) => {
await context.sendActivity('🚨 High CPU alert on instance i-1234567890');
});
📚 Additional Resources
Documentation
- Getting Started Guide - Basic setup instructions
- Bot Commands Reference - Available commands
- Troubleshooting - Common issues
External Resources
Need Help?
- 📧 Enterprise Support: support@ohlala.cloud
- 💬 Teams Community: Join our user group
- 📹 Video Tutorials: Advanced configuration walkthroughs