How to Build Copilot Studio Agents in VS Code Using Natural Language
In this video, Nilüfer Doğan walks us through building a fully production-ready HR Agent Copilot Studio agent using GitHub Copilot in VS Code to write the code in natural language, from scratch all the way to deployment. The agent handles two real-world scenarios: answering HR policy questions using RAG over company documents, and managing employee leave requests directly in Microsoft Dataverse. What you’ll learn: ✅ How to use GitHub Copilot in VS Code to build agent logic using natural language ✅ How to design an Agent-to-Agent architecture with an Orchestrator that routes queries to the right sub-agent ✅ How to build a RAG pipeline with Azure AI Search over HR documents ✅ How to connect to Microsoft Dataverse using Managed Identity ✅ How to create and configure a Custom Connector in Power Platform programmatically with Python 🔗 GitHub Repo: https://github.com/niluferdogan/hragent
🔹 Adding Application User in Power Platform Admin Center
🔹 Assigning Roles and Permissions
🔹 Creating Power Automate Flow with Service Principal
🔹 Testing and verifying Dataverse entries
🔹 Understanding Licensing Requirements (Per Flow vs Process License)
💡 Why this matters: Service Principal ensures no dependency on user credentials, avoids license expiry issues, and enables true enterprise governance in Power Platform.
📚 Best suited for:
✅ Power Platform Admins & Architects
✅ Enterprise Developers working with ALM
✅ Power Automate Professionals using Dataverse or Dynamics 365
👉 Watch till the end to understand licensing implications and real-world use cases.
🧭 Chapters (Without Timestamps)
⚙️ Introduction to Service Principal
💡 When to Use Service Principal in Power Automate
🏗️ Creating Service Principal in Azure Entra ID
🔑 Setting Client ID, Secret, and Tenant ID
🧱 Adding App User in Power Platform Admin Center
👨💼 Assigning System Administrator Role
🔗 Connecting Service Principal in Power Automate Flow
🧩 Creating Dataverse Flow using Service Principal
📊 Testing and Comparing Flow Executions
💰 Understanding Licensing Requirements
✅ Summary and Key Learnings
💎 Key Takeaways
✅ Service Principal = Non-Human Identity for secure automation
✅ Ideal for mission-critical or enterprise-wide flows
✅ Requires Client ID, Secret, Tenant ID for authentication
✅ Add as Application User in Power Platform environment
✅ Needs System Administrator or custom security role
✅ Works best with Dataverse (not SharePoint or standard connectors)
✅ Requires Per Flow or Process License, not user license
✅ Eliminates dependency on personal credentials