Coder Social home page Coder Social logo

powervirtualagentssamples's Introduction

Microsoft Copilot Studio Samples

Overview

This repository contains samples and artifacts for Microsoft Copilot Studio.

Useful links for Microsoft Copilot Studio

Description Link
Home page aka.ms/CopilotStudio
Official blog aka.ms/CopilotStudioBlog
Community forum aka.ms/CopilotStudioCommunity
Product documentation aka.ms/CopilotStudioDocs
Guidance documentation aka.ms/CopilotStudioGuidance
GitHub repository of samples aka.ms/CopilotStudioSamples
Demo Copilot Studio aka.ms/CopilotStudioDemo
Try Copilot Studio aka.ms/TryCopilotStudio

Samples list

Sample Name Description View
BotConnectorApp Demonstrates how to connect your bot to a custom app for example mobile-device app View
BuildYourOwnCanvasSamples Demonstrates how to connect your bot to a custom canvas with various functionality View
ConnectToEngagementHub Demonstrates how to detect a handoff activity during a bot conversation and read conversation context View
CustomAnalytics This solution allows customers to create a custom Power BI dashboard on top of their copilots analytics data View
HumanVerificationSample Identify if the user on the other side is a human or a bot by sending an email to the user with a verification code View
ImplementationGuide The implementation guide document provides a framework to do a 360-degree review of a Copilot Studio project. Through probing questions, it highlights potential risks and gaps, aims at aligning the project with the product roadmap, and shares guidance, best practices and reference architecture examples View
MultilingualBotSample Sample implementation of a middleware translation relay bot to do real-time translations using Azure services View
RelayBotSample Demonstrates how to connect your bot to existing Azure Bot Service channels View
SharePointSSOComponent A Sharepoint component demonstrating how copilots can be deployed to SharePoint sites with SSO enabled View
TestFramework Run tests against a bot using Direct Line channel and validate that the bot works as expected View

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Support

Although the underlying features and components used to build these samples are fully supported (such as Copilot Studio bots, Power Platform products and capabilities, etc.), the samples themselves represent example implementations of these features. Our customers, partners, and community can use and customize these features to implement capabilities in their organizations.

If you face issues with:

Microsoft Open Source Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct.

Resources:

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Security

Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include Microsoft, Azure, DotNet, AspNet, Xamarin, and our GitHub organizations.

If you believe you have found a security vulnerability in any Microsoft-owned repository that meets Microsoft's Microsoft's definition of a security vulnerability, please report it to us as described below.

Reporting Security Issues

Please do not report security vulnerabilities through public GitHub issues.

Instead, please report them to the Microsoft Security Response Center (MSRC) at https://msrc.microsoft.com/create-report.

If you prefer to submit without logging in, send email to [email protected]. If possible, encrypt your message with our PGP key; please download it from the the Microsoft Security Response Center PGP Key page.

You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at microsoft.com/msrc.

Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:

  • Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
  • Full paths of source file(s) related to the manifestation of the issue
  • The location of the affected source code (tag/branch/commit or direct URL)
  • Any special configuration required to reproduce the issue
  • Step-by-step instructions to reproduce the issue
  • Proof-of-concept or exploit code (if possible)
  • Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our Microsoft Bug Bounty Program page for more details about our active programs.

Preferred Languages

We prefer all communications to be in English.

Policy

Microsoft follows the principle of Coordinated Vulnerability Disclosure.

Copyright (c) Microsoft Corporation. All rights reserved.

powervirtualagentssamples's People

Contributors

adilei avatar bradrlaw avatar dependabot[bot] avatar elliottperry avatar expiscornovus avatar federicobernal avatar flow-joe avatar henryjammes avatar imicknl avatar luchoperes avatar luislera avatar marcozama avatar mattfarm avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar mkchow5928 avatar nesrivastavams avatar pawant-ms avatar peterswimm avatar puvvadakc avatar sarahcritchley avatar sbacha avatar vidrana avatar weisun022 avatar zilberd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

powervirtualagentssamples's Issues

SSO configuration

Hello,
we are struggling to configure SSO (with AAD authentification) with PVA
We followed these documentations
https://docs.microsoft.com/en-us/power-virtual-agents/configuration-end-user-authentication
https://docs.microsoft.com/en-us/power-virtual-agents/configure-sso

the conversations starts and the auth card is handled by the javascript code (we also tried the sample from this repo)
PVA always gives an authentification error and the user cannot proceed to the conversation

Can you give us some insight about what might be wrong ?
We don't have any error in the browser itsleft as it appears to be generated by PVA's backend itself

Any help would be greatly appreaciated
Thanks

[Implementation Guide] Import error: The solution file is invalid. The compressed file must contain the following files at its root: solution.xml, customizations.xml, and [Content_Types].xml. Customization files exported from previous versions of Microsoft Dynamics 365 are not supported.

Template version: the version of number is available on the first slide, in the bottom left corner.
Slide number(s): slides where your feedback applies to

Detail your feedback and suggestions:
Add details on your feedback on the implementation guide, or suggestions for new content or improvements.
When tried to import solution in Power Apps, got below error message:
The solution file is invalid. The compressed file must contain the following files at its root: solution.xml, customizations.xml, and [Content_Types].xml. Customization files exported from previous versions of Microsoft Dynamics 365 are not supported.
image

File uploads - Keep the initial name of the uploaded file

Hi,

How can I keep the file name in Azure Store as uploaded? I'm trying to send them as attachments to an email via power automate, but without the file extension, it will be challenging for the agents to open these files. I saw you're keeping the file's name in the metadata, but Flow cannot read it. So, instead of generating a new name, I want to keep the existing + a suffix to ensure it's unique in the folder in the storage. Thanks

Best regards,

several errors: data wont pull thur from dataverse

Hello,

encountered several errors after trying to input the link of dataverse (removed the "https://: and the "/" -still errors, provided the attachment of the several errors found

  • TDS is enable
  • what else needs to be enables for the connection from dataverse to work ?

errors.docx
d

SSO is not working for new PVA Bots

I have been using PVA Bots with SSO Javascript implementation and it has been working fine so far. I created a couple of new bots and followed the same steps with AAD App registration and PVA but SSO does not seem to be working. Not sure if recently something has changed in the way SSO is handled in PVA.

I tried with ReactWebchat as well and I see that SSO works fine with existing PVA Bot and Azure AD App. It keeps prompting for login when used with my new PVA and new AAD App.

Appreciate if someone can shed some light on any recent changes that could break SSO

Empty data tables after Power Query Processing

Hello, I new in here and I am starting to build a Power BI report following instructions and using template provided. I realized that I can read data from bot and botcomponent tables while conversationscript still empty.
After Power Query processing all information and table are empties and no data is avalilable on Power BI. Any clues of what should I do to fix it?

Show Adaptive Cards

There is no documentation about how to use the full bundle example. If I send the JSON of the Adaptive Card as an answer to the WebChat, the JSON is shown instead of the adaptive card. How can I make it render the Adaptive Card?

PVATestFramework - Linebreaks and RegEx

Hi,
I am trying PVATestFramework tool and I found the following problem:
When testing chatbot messages with few paragraphs .chat file does not admit line-breaking, and neither any code variation: html
, \n, \r, \ etc... In addition, when trying RegEx as documentation, if I place <(\n)> between paragraphs tests are always successful no mater what.

Few examples:
-------------Example 1------------------------------------------------------------
[33mTest script failed
[33mExpected: Thanks. Here's how to check and update where your interest is paid: 1. Log in on our website 2. Select the account you'd like to update3.\ Select 'Account options' >4. Select 'Manage interest'
[33mReceived: Thanks. Here's how to check and update where your interest is paid:

  1. Log in on our website
  2. Select the account you'd like to update
  3. Select 'Account options'
  4. Select 'Manage interest'
    -------------Example 2------------------------------------------------------------
    --if i use <(\n)> this expected input in the .chat file will is always marked as passed even if it is not correct----
    bot: this test should fail Thanks. Here's how to check and update where your interest is paid: <(\n)> 1. Log in on our website <(\n)> 2. Select the account you'd like to update <(\n)> 3.\ Select 'Account options' > <(\n)>4. Select 'Manage interest'

Is there any solution for this?
Thanks

Bot PowerBI Analytics failing - "Column 'botid' in Table 'bots' contains blank values"

As per description.

Trying to use the PowerBI Custom Analytics. Have only got one Bot in the solution & getting this error message when trying to build the queries:

"Column 'botid' in Table 'bots' contains blank values and this is not allowed for columns on the one side of a many-to-one relationship or for columns that are used as the primary key of a table. (botid (185))."

Any input would be welcome!

Relay Bot not connecting to PVA on using teams

I'm using the Relay Bot sample to connect to my virtual agent as a first step to extend its capabilities. The relay bot works when I test locally on the Emulator. It also works as expected when I deployed to Azure and tested on the Web Chat. However, the relay bot fails to connect to my Power Virtual Agent when I use Teams. I can send messages from the Relay bot to Teams but when I try to connect with my PVA bot it doesn't respond. I have tried adding valid domains to the Teams manifesto (see below), but I don't know what else to try

{ "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.7/MicrosoftTeams.schema.json", "manifestVersion": "1.7", "version": "1.0.0", "id": "f551eaad-142c-476e-b588-33b0b4aad037", "packageName": "XYZ.com", "developer": { "name": "The Spur Group", "websiteUrl": "https://www.XYZ.com", "privacyUrl": "https://www.XYZ.com/privacy", "termsOfUseUrl": "https://www.XYZ.com/tou" }, "icons": { "color": "color.png", "outline": "outline.png" }, "name": { "short": "RelayLono", "full": "Relay Lono Simple" }, "description": { "short": "This is a bot framework bot with PVA in it", "full": "This is a bot framework bot with PVAin it and also it runs smoothly on teams" }, "accentColor": "#FFFFFF", "bots": [ { "botId": "344f6e52-d015-4177-80fc-665364b35ba3", "scopes": [ "personal" ], "supportsFiles": false, "isNotificationOnly": false } ], "permissions": [ "identity", "messageTeamMembers" ], "validDomains": [ "www.powerva.microsoft.com", "powerva.microsoft.com" ] }

[Implementation Guide] <title>

Template version: the version of number is available on the first slide, in the bottom left corner.
Slide number(s): slides where your feedback applies to

Detail your feedback and suggestions:
Add details on your feedback on the implementation guide, or suggestions for new content or improvements.

question of SSO

can I use the bot as an end user in a desktop app?
is that I was performing the validation, but the login issue asks me to install an application to receive the bot.framework code, does anyone know why this error is?
I get this message
image

Talk to Agent Issue

Hi,

We used the examples from PowerVirtualAgentsSamples/BuildYourOwnCanvasSamples/2.location-and-file-uploading/

We just having issue on PVA inbuilt Escalate to Agent command as it does not escalate the bot conversation to agent in omnichannel. We also checked using the code snippet of livechat generated in omnichannel and it escalated fine when we connect our PVA bot.

My concern is that escalate to agent is not supported in webchat or do we need further configuration to set it up?
Thank you.

Ncs5LcoGIV
image
MicrosoftTeams-image (11)

CORS problem

Does anyone else get an error when the application tries to add an attachment to Azure?

Which sample should be used to connect to PVA bot from BF Virtual assistant

We have an architecture of BOTs created using Bot frameworks Virtual Assistant in typescript. We have few Skill bots or I can call them Skills which are connected to master Virtual Assistant bot.

Q1. I am interested to know if we can connect a PVA Bot to a Virtual Assistant which in Typescript ?

Can we use any of the following sample libraries to do so ?

https://github.com/microsoft/PowerVirtualAgentsSamples/tree/master/RelayBotSample
https://github.com/microsoft/PowerVirtualAgentsSamples/tree/master/BotConnectorApp

Missing ResponseConverter file

Hi Team,

Can you help with the file referred in the below link https://github.com/MicrosoftDocs/power-platform/blob/main/power-virtual-agents/publication-connect-bot-to-azure-bot-service-channels.md ResponseConverter.cs. Link is broken and relay bot sample code does not contain any code. Am working on integration PVA bot as a child bot to the Bot framework Bot using the Directline and want to understand the context management to be able to manage the conversations. Do we have any reference which talks about sending custom variables from PVA topic dialog step to Azure Bot framework SDK ?

Is it possible to extend the retention period to 2 years?

Hello, my concern is that I want the summary analytics data for chatbot to be retained for upto 2 years to adhere to company policies, I contacted Microsoft Support to check if there is a way to customize the date settings when I came across this PoerBI dashboard. I can see the maximum it can go back to is 2 months, is it possible to change the settings or maybe change some query to get that data as far back to 2 years?
Thanks in advance!
PowerBIPVA

Error: Site Missing code 403 from https://directline.botframework.com/v3/directline/conversations

Hi the following piece of code was working fine up to last week, from today we are getting the following 403 error after successfully retrieve the token and when performing request to: https://directline.botframework.com/v3/directline/conversations

response body:

"error": {
    "code": "BadArgument",
    "message": "Site missing. Learn more about sites  https://docs.microsoft.com/azure/bot-service/bot-service-channel-connect-directline?view=azure-bot-service-4.0#add-new-site."
  }

image

Here is the full test code:

`

<!DOCTYPE html>
<html lang="en-US">
  <head>
    <title>Web Chat</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script crossorigin="anonymous" src="https://cdn.botframework.com/botframework-webchat/latest/webchat.js"></script>
    <style>
      html,
      body {
        height: 100%;
      }

      body {
        margin: 0;
      }

      #webchat {
        height: 100%;
        width: 100%;
      }
    </style>
  </head>
  <body>
    <div id="webchat" role="main"></div>
    <script>
      (async function() {
        const res = await fetch('https://ced36af1b92ee6ae99db50a8734a78.5a.environment.api.powerplatform.com/powervirtualagents/bots/b8ab704c-8d06-417e-b2b5-fc65a0abf77f/directline/token?api-version=2022-03-01-preview', { method: 'GET' });
        const { token } = await res.json();

        window.WebChat.renderWebChat(
          {
            directLine: window.WebChat.createDirectLine({ token })
          },
          document.getElementById('webchat')
        );

        document.querySelector('#webchat > *').focus();
      })().catch(err => console.error(err));
    </script>
  </body>
</html>

`

Get Activity type "EndOfConversation" from BotConnector in Relay bot sample

Hi Team,
I am using Relay Bot sample code to connect to my PVA bot and get the response from PVA.
I need to get "EndOfConversation" actitvity to get out of PVA flow as I am using orchestrator to get the top NLU.

I am getting responses properly. But, unable to get 'EndOfConversation' activity.

Also not able to get other fields like "TopicName" or "TopScore" etc.
Due to this, I am unable to get when the topic is ended

Can anyone help me with this?

Please refer below screenshot
image

Regards
Namrata

Data no longer refreshing

My BI report has stopped working. Have tried setting up from scratch but now getting this error:

"Query 'bots' (step 'Removed Columns1') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination."

Any ideas as now none of the visuals are working.

Thanks

Server URL not working for PVAs running inside a dataverser for teams

I have PVA bot built in Team which leverages dataverser for teams. ( this is different than building PVA on powerva.microsoft.com which leverages dedicated dataverser environment )

I am following Installation steps here where I server url associated with your Dataverse environment is not working form. I am not getting logged on to Teams dataverser.

Screen Shot 2021-05-17 at 12 33 48 PM

Is there anyway to get this working? Or may be I'm not having correct URL to my Team dataverser?

PVATestFramework, Error 407

Possible scalability issue, when running few times executable I get error 407 from Directline-API connection, that makes me wait few minutes until I can continue testing.
I built a similar tool in Python but using bearer auth token and never experienced this issue before. Might be a good solution.

Custom Analytics dashboard shows warning on first use.

What sample tool are you using?
Custom Analytics Dashboard
Describe the bug

Custom Analytics dashboard throws warning on first use.

Query 'bots' (step 'Removed Blank Rows') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.

image

SQL error

Microsoft SQL: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

how to resolve this error

Wrong code for location sample

The code for the "3.location-processing" sample under "PowerVirtualAgentsSamples/BuildYourOwnCanvasSamples/"
seems to be a clone of the "2.file-uploading sample."

Problem with load resources

Hi, when running index.html on live server I get such errors in the console:

Failed to load resource: the server responded with a status of 404 (Not Found) :5500/api/directline/token:1

Error: Failed to fetch JSON due to 404 index.html:242
at fetchJSON (index.html:136:17)
at async main (index.html:229:27)
(anonymous) @ index.html:242

Does anyone know what this may be about?

MultilingualBotSample issue when using User Managed Identity for the Bot ID

Hello,

Instead of using an app registration, I am using a user assigned managed identity for the App Id of my app. In the appsettings.json file there is a section for 'MicrosoftAppPassword', which I don't use as I am using the managed identity. I am getting errors when trying to leave the 'MicrosoftAppPassword' section blank or fill with some dummy data, would it be possible to share how to modify the code to work with a user assigned managed identity App ID instead of one generated from an app registration with an App password?

Thank you.

Unable to open PVA.pbit

Hi
Downloaded the files. On opening the pbit I am getting the message that it can't be opened.

"Either the file is encrypted or corrupted"

Running Version: 2.95.983.0 64-bit (July 2021)

Suggested actions not appearing for HeroCards in Relay Bot

For normal text, the suggested actions work just fine.

However suggested actions under Hero Cards is not displayed.

image

I have implemented the relay bot using Power Virtual Agent with features such as Hero cards and suggested buttons created using Bot Framework Composer.

#ProductActivity
[Activity
Attachments = ${HeroCardTemplate("I am interested to learn more about ___")}
SuggestedActions = Option 1 | Option 2 | Option 3
]

# HeroCardTemplate(title)
[HeroCard 
        title=${coalesce(title, "")}
        buttons=${cardActionTemplate( 'imBack',  'Go', 'Products')}
]

64 bit version of PVATestFramework.exe

Hi,

I downloaded PVATestFramework.exe the win-x64 version. But it doesn't run in win-11, says not compatible with 64 bit windows. I tried the x86 as well, same issue. Any ideas?

Regards.

Weird behaviour

Hello All

Sorry to bother you ... but I don't manage to make the sample work
@ generated line 212
const files = await Promise.all(action.payload.files.map(({ name, url }) => uploadFile({ name, url })));
I get
{"code":"ResourceNotFound","message":"/f6ea0149-a8ac-4078-be5e-a50165573a9f; caused by Error: ENOENT: no such file or directory, stat 'C:\[...]\web\public\f6ea0149-a8ac-4078-be5e-a50165573a9f'"}

any idea?

Only first topic appearing in Topics page

Hi,

I am using the basic version of this PBIT to visualise the chatbot data. In my chatbot, the user is directed to topics based on button selections, but there are no word triggers for those topics.

When a user uses the chatbot, only the first topic of "Greeting" is displayed and none of the other topics. How do I fix this so that all topics appear?

Thanks,
Phil

[BotConectorApp] https://powerva.microsoft.com/api/botmanagement/v1/directline/directlinetoken doesn't work

I tried BotConectorApp with 3 different bots within a same tenantID (with Require secured access on and off). But it doesn't work. After debugging, I found https://powerva.microsoft.com/api/botmanagement/v1/directline/directlinetoken?botId={botId}&tenantId={tenantId}, doesn't return the token. I gave me this:

{
  "ErrorCode": 4103,
  "ErrorMessage": "ItemWithIdNotFound",
  "DiagnosticsMessage": null,
  "ErrorInfo": null
}

I don't know where to look for the error code 4103. I am not sure if it's something wrong with my tenant?
I tried to generate the token with https://directline.botframework.com/v3/directline/tokens/generate with the secret key and it worked. I will try to use that token in BotConectorApp instead and give an update later

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.