Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions samples/da-sharepoint-data-manager/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# TeamsFx files
env/.env.*.user
env/.env.local
.localConfigs
appPackage/build

# dependencies
node_modules/

# misc
.env
.deployment
.DS_Store
5 changes: 5 additions & 0 deletions samples/da-sharepoint-data-manager/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"TeamsDevApp.ms-teams-vscode-extension"
]
}
35 changes: 35 additions & 0 deletions samples/da-sharepoint-data-manager/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Preview in Copilot (Edge)",
"type": "msedge",
"request": "launch",
"url": "https://m365.cloud.microsoft/chat/entity1-d870f6cd-4aa5-4d42-9626-ab690c041429/${agent-hint}?auth=2&developerMode=Basic",
"presentation": {
"group": "remote",
"order": 1
},
"internalConsoleOptions": "neverOpen",
"runtimeArgs": [
"--remote-debugging-port=9222",
"--no-first-run"
]
},
{
"name": "Preview in Copilot (Chrome)",
"type": "chrome",
"request": "launch",
"url": "https://m365.cloud.microsoft/chat/entity1-d870f6cd-4aa5-4d42-9626-ab690c041429/${agent-hint}?auth=2&developerMode=Basic",
"presentation": {
"group": "remote",
"order": 2
},
"internalConsoleOptions": "neverOpen",
"runtimeArgs": [
"--remote-debugging-port=9223",
"--no-first-run"
]
}
]
}
11 changes: 11 additions & 0 deletions samples/da-sharepoint-data-manager/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"debug.onTaskErrors": "abort",
"json.schemas": [
{
"fileMatch": [
"/aad.*.json"
],
"schema": {}
}
]
}
81 changes: 81 additions & 0 deletions samples/da-sharepoint-data-manager/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Overview of the Data Manager Agent

With the Data Manager agent, you can build a custom version of Copilot that helps users manage and organize their SharePoint sites and Microsoft 365 content. This agent leverages OneDrive and SharePoint access along with web search capabilities to provide guidance and information based on your content.

## Get started with the Data Manager

## Features

### Document Search
- Search across SharePoint sites and libraries
- Filter by content and metadata
- Discover relevant documents

### File Organization
- Smart folder structure suggestions
- Metadata tagging and classification advice
- Content type recommendations

### Document Management Guidance
- Best practices for document organization
- SharePoint organization strategies
- Content classification recommendations

### Web Search Integration
- Access to relevant documentation and guidelines
- Search for information from trusted sources
- Up-to-date guidance from official documentation

### Pharmaceutical Manufacturing Intelligence
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems out of scope if the agent is named "Data Manager". Let's remove it because it doesn't seem related to the agent's functionality, not even looking at the agent's conversation starters.

- Guidance on FDA, EMA, WHO, and ICH regulatory requirements
- Pharmaceutical documentation management according to industry standards
- GxP data integrity, traceability, and audit readiness recommendations
- Access to regulatory information from official sources

> **Note**: All required environment variables (TEAMS_APP_ID, TEAMS_APP_TENANT_ID, etc.) are automatically generated during the provisioning step. You don't need to set up any environment files manually.

> **Prerequisites**
>
> To run this Data Manager Agent in your local dev machine, you will need:
>
> - [Node.js](https://nodejs.org/), supported versions: 18, 20, 22
> - A [Microsoft 365 account for development](https://docs.microsoft.com/microsoftteams/platform/toolkit/accounts).
> - [Teams Toolkit Visual Studio Code Extension](https://aka.ms/teams-toolkit) version 5.0.0 and higher or [Teams Toolkit CLI](https://aka.ms/teamsfx-toolkit-cli)
> - [Microsoft 365 Copilot license](https://learn.microsoft.com/microsoft-365-copilot/extensibility/prerequisites#prerequisites)

![image](https://github.com/user-attachments/assets/e1c2a3b3-2e59-4e9b-8335-19315e92ba30)

1. First, select the Teams Toolkit icon on the left in the VS Code toolbar.
2. In the Account section, sign in with your [Microsoft 365 account](https://docs.microsoft.com/microsoftteams/platform/toolkit/accounts) if you haven't already.
3. Create Teams app by clicking `Provision` in "Lifecycle" section.
4. Select `Preview in Copilot (Edge)` or `Preview in Copilot (Chrome)` from the launch configuration dropdown.
5. Once the Copilot app is loaded in the browser, click on the "…" menu and select "Copilot chats". You will see your Data Manager agent on the right rail. Clicking on it will change the experience to showcase the logo and name of your data management agent.
6. Ask questions about your SharePoint content, and the agent will help you manage and organize your data.


## Version history

Version|Date|Comments
-------|----|--------
1.0|May 2025|Initial release

## Contributors

* [Kateryna Turuntseva](https://github.com/KatyaT27)

## Help

We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.

You can try looking at [issues related to this sample](https://github.com/pnp/copilot-pro-dev-samples/issues?q=label%3A%22sample%3A%20da-qna-graphapi-plugin%22) to see if anybody else is having the same issues.

If you encounter any issues using this sample, [create a new issue](https://github.com/pnp/copilot-pro-dev-samples/issues/new).

Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/copilot-pro-dev-samples/issues/new).


## Disclaimer

**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**

<img src="https://m365-visitor-stats.azurewebsites.net/copilot-pro-dev-samples/da-sharepoint-data-manager" />
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.3/schema.json",
"version": "v1.3",
"name": "DataManager",
"description": "Declarative agent created with Teams Toolkit",
"instructions": "$[file('instruction.txt')]",
"conversation_starters": [
{
"text": "Help me organize my files in SharePoint"
},
{
"text": "Suggest a folder structure for my documents"
},
{
"text": "What are best practices for document naming in SharePoint?"
},
{
"text": "Show me how to use metadata in SharePoint"
},
{
"text": "What are document organization best practices?"
},
{
"text": "How can I improve searchability of my SharePoint documents?"
}
],
"capabilities": [
{
"name": "OneDriveAndSharePoint"
},
{
"name": "WebSearch"
}
]
}
43 changes: 43 additions & 0 deletions samples/da-sharepoint-data-manager/appPackage/instruction.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
You are a Microsoft 365 Data Management Agent, specialized in helping users organize and find information in their SharePoint sites and Microsoft 365 content.

# Skills and capabilities:
- Search for documents across SharePoint sites and libraries based on content and metadata
- Suggest organization strategies for files and document libraries
- Provide best practices for metadata tagging and classification
- Suggest appropriate folder structures and content organization
- Offer guidance on document naming conventions and organization
- Help users find specific content in their SharePoint environment
- Search the web for relevant document management best practices and guidance

# Guidelines:
- Always prioritize information security and data privacy in your recommendations
- When helping with file organization, focus on best practices for document management in SharePoint
- Provide clear, step-by-step instructions when explaining SharePoint operations
- Leverage SharePoint's metadata and content type capabilities for advanced organization
- Always respect organizational content management policies
- Ensure all pharmaceutical data management recommendations comply with applicable regulations
- For GxP-related content, emphasize data integrity, traceability, and audit readiness
- When searching for regulatory or compliance information, prioritize official sources like:
- https://eur-lex.europa.eu/eli/reg
- https://digital-strategy.ec.europa.eu/en/policies
- https://www.fda.gov/drugs
- https://www.ich.org/page/quality-guidelines
- https://picscheme.org/en/publications
- https://www.who.int/teams/health-product-policy-and-standards
- https://www.ema.europa.eu/en
- For Microsoft 365 and SharePoint documentation, refer to:
- https://learn.microsoft.com/en-us/microsoft-365
- https://learn.microsoft.com/en-us/sharepoint
- https://learn.microsoft.com/en-gb/copilot/
- https://m365scripts.com/sharepoint-online/how-to-manage-unique-permissions-in-sharepoint-online/
- Remember that you cannot modify permissions, create reports on site usage, or implement data governance policies - only provide guidance and best practices
- For questions about documentation standards or regulations, search for current information rather than making claims about specific requirements

# Response format:
- Provide concise, actionable responses
- When listing documents or sites, format as a clear table with relevant metadata
- For complex processes, break down into numbered steps
- When appropriate, suggest both immediate actions and long-term strategies
- If additional context is needed to assist the user, ask clarifying questions first
- Include links to specific documents, sites, or settings when available
- When providing information from web searches, always cite the source with links
39 changes: 39 additions & 0 deletions samples/da-sharepoint-data-manager/appPackage/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/teams/v1.19/MicrosoftTeams.schema.json",
"manifestVersion": "1.19",
"version": "1.0.0",
"id": "${{TEAMS_APP_ID}}",
"developer": {
"name": "Teams App, Inc.",
"websiteUrl": "https://www.example.com",
"privacyUrl": "https://www.example.com/privacy",
"termsOfUseUrl": "https://www.example.com/termofuse"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "DataManager${{APP_NAME_SUFFIX}}",
"full": "Microsoft 365 Data Management Agent"
},
"description": {
"short": "A content organization assistant for Microsoft 365",
"full": "This agent helps users organize and find documents in their SharePoint sites and Microsoft 365 content. It provides search assistance, organization suggestions, and best practices. The agent can search the web for reference information but cannot modify permissions, create analytics reports, or implement governance policies - it only provides guidance and recommendations."
},
"accentColor": "#FFFFFF",
"composeExtensions": [],
"permissions": [
"identity",
"messageTeamMembers"
],
"copilotAgents": {
"declarativeAgents": [
{
"id": "declarativeAgent",
"file": "declarativeAgent.json"
}
]
},
"validDomains": []
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions samples/da-sharepoint-data-manager/env/.env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file includes environment variables that will be committed to git by default.

# Built-in environment variables
TEAMSFX_ENV=dev
APP_NAME_SUFFIX=dev

# Generated during provision, you can also add your own variables.
TEAMS_APP_ID=9f7b4933-65ed-41f4-bd6f-b2f2d76e79af
TEAMS_APP_TENANT_ID=a2b66f87-c07b-42fb-ba76-ea0fc39369b5
M365_TITLE_ID=U_a1166f4e-d0da-48f6-6ce3-f12350a07094
M365_APP_ID=4c76a622-b82c-469b-84db-a634d659fc8a
81 changes: 81 additions & 0 deletions samples/da-sharepoint-data-manager/teamsapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.8/yaml.schema.json
# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file
# Visit https://aka.ms/teamsfx-actions for details on actions
version: v1.8

environmentFolderPath: ./env

# Triggered when 'teamsapp provision' is executed
provision:
# Creates a Teams app
- uses: teamsApp/create
with:
# Teams app name
name: DataManager${{APP_NAME_SUFFIX}}
# Write the information of created resources into environment file for
# the specified environment variable(s).
writeToEnvironmentFile:
teamsAppId: TEAMS_APP_ID

# Build Teams app package with latest env value
- uses: teamsApp/zipAppPackage
with:
# Path to manifest template
manifestPath: ./appPackage/manifest.json
outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip
outputFolder: ./appPackage/build
# Validate app package using validation rules
- uses: teamsApp/validateAppPackage
with:
# Relative path to this file. This is the path for built zip file.
appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip
# Apply the Teams app manifest to an existing Teams app in
# Teams Developer Portal.
# Will use the app id in manifest file to determine which Teams app to update.
- uses: teamsApp/update
with:
# Relative path to this file. This is the path for built zip file.
appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip
# Extend your Teams app to Outlook and the Microsoft 365 app
- uses: teamsApp/extendToM365
with:
# Relative path to the build app package.
appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip
# Write the information of created resources into environment file for
# the specified environment variable(s).
writeToEnvironmentFile:
titleId: M365_TITLE_ID
appId: M365_APP_ID

# Triggered when 'teamsapp publish' is executed
publish:
# Build Teams app package with latest env value
- uses: teamsApp/zipAppPackage
with:
# Path to manifest template
manifestPath: ./appPackage/manifest.json
outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip
outputFolder: ./appPackage/build
# Validate app package using validation rules
- uses: teamsApp/validateAppPackage
with:
# Relative path to this file. This is the path for built zip file.
appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip
# Apply the Teams app manifest to an existing Teams app in
# Teams Developer Portal.
# Will use the app id in manifest file to determine which Teams app to update.
- uses: teamsApp/update
with:
# Relative path to this file. This is the path for built zip file.
appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip
# Publish the app to
# Teams Admin Center (https://admin.teams.microsoft.com/policies/manage-apps)
# for review and approval
- uses: teamsApp/publishAppPackage
with:
appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip
# Write the information of created resources into environment file for
# the specified environment variable(s).
writeToEnvironmentFile:
publishedAppId: TEAMS_APP_PUBLISHED_APP_ID
projectId: 6e4e05ca-4d39-4b0d-b769-61340e6468f3