Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 0uNoqkH8h5SdHpwdYFuzgK
Copilot Studio - Building Copilot Studio Chatbo...
Unanswered

Microsoft Teams does not show citation links

Like (0) ShareShare
ReportReport
Posted on 20 Dec 2023 17:38:47 by

I'm working on a chatbot that reads some PDF files through documents uploaded directly to the Generative AI part. At the beginning of the tests, it brought the citations with the links, but it stopped linking. Now it only displays the information as: "Item name [1]" but without any link.

 

The links normally appear in the Copilot Test.

 

Captura de Tela 2023-12-20 às 14.35.55.png

 

Captura de Tela 2023-12-20 às 14.36.21.png

 

I tested some solutions listed here, like "https://powerusers.microsoft.com/t5/Building-Copilot-Studio-Chatbots/Citations-references-not-showing-in-the-chat-in-Teams-but/ m-p/2445958#M1435" and "https://powerusers.microsoft.com/t5/Building-Copilot-Studio-Chatbots/Citations-for-SharePoint-links-not-working-for-Teams-bot-but/m-p /2504586#M1564" but I was unable to apply them successfully.

Categories:
  • abbastailor Profile Picture
    Microsoft Employee on 26 Apr 2024 at 06:59:18
    Re: Microsoft Teams does not show citation links

    I've tried this approach. I am sending the citations as a part of a different adaptive card. Almost all citations are showing correctly but there's one reference with title : "FAQs". Copilot studio identifies it as a citation and again moves it to the dropdown and hence that one link does not show in teams.

    abbastailor_0-1714110984423.png

     

  • theMac Profile Picture
    on 01 Mar 2024 at 09:49:44
    Re: Microsoft Teams does not show citation links

    mah I tested both codes and in both cases I get the error you can see attached: the adaptive card doesn't have a valid OutputType but it doesn't seem a thing I can adjust.
    Anyway my target would be to intercept the answer generated and remove the links to the file I gave to copilot as data source (I would leave the links to the public websites and remove the others)

  • ill8 Profile Picture
    4 on 01 Mar 2024 at 08:07:02
    Re: Microsoft Teams does not show citation links

    looks like solution is here Solved: Re: Citations / references not showing in the chat... - Page 2 - Power Platform Community (microsoft.com): "

    The last thing you want to do is to update the condition to catch blank answers.

    Otherwise, blank answers are not exactly outputting as a blank record, but {}.

    Instead of the Topic.Answer variable, change it to the Topic.Answer.Text one:

    "

  • theMac Profile Picture
    on 29 Feb 2024 at 08:43:20
    Re: Microsoft Teams does not show citation links

    @HenryJammesWell I changed the variable Answer from Local to Global and made it including complete format.
    Now I've an error in formula "The 'If' function has invalid arguments." referred to if(IsBlank(Url))

  • theMac Profile Picture
    on 28 Feb 2024 at 17:11:07
    Re: Microsoft Teams does not show citation links

    I'd like to do the same on my chatbot but it seems I have another interface: are you using Copilot Studio to do that?
    May you explain to me how can I change the Answer in a globalVariable??
    ok solved

  • HenryJammes Profile Picture
    on 02 Jan 2024 at 12:24:08
    Re: Microsoft Teams does not show citation links

    Hi @AnithaBM 

     

    A prerequisite to access the full answer and its citations is to save it in a "complete" format:

     

    HenryJammes_0-1704198239320.png

     

     

     

  • AnithaBM Profile Picture
    2 on 27 Dec 2023 at 08:51:19
    Re: Microsoft Teams does not show citation links

    when I add  Global.Answer as suggested in the post and try to edit the json formula. I get an error saying "invalid use of ."

    Global.Answer selection

    AnithaBM_1-1703667180751.png

     

    Json formula

    AnithaBM_0-1703667009853.png

     

     

  • HenryJammes Profile Picture
    on 21 Dec 2023 at 13:14:32
    Re: Microsoft Teams does not show citation links

    Hi @HenriqueGauge 

     

    I got something similar working by accessing the generated answer citation text.

    E.g.: when both content from public website and document is retrieved:

     

    HenryJammes_0-1703164260342.png

     

    When clicking on the citation that doesn't have a URL, I display the full source citation:

     

    HenryJammes_1-1703164296116.png

     

    This also works over the Teams channel:

     

    HenryJammes_2-1703164315942.png

     

    Assuming you are saving the generated answer with a complete format (in my example below, I stored it as a global variable, referenced by Global.Answer) this is the Power Fx formula I've used for the adaptive card.

     

     

    {
     type: "AdaptiveCard",
     '$schema': "http://adaptivecards.io/schemas/adaptive-card.json",
     version: "1.5",
     body: [
     {
     type: "Container",
     items: [
     {
     type: "TextBlock",
     // Generated answer text
     text: Global.Answer.Text.Content,
     wrap: true
     }
     ]
     },
     {
     type: "Container",
     items: ForAll(Global.Answer.Text.CitationSources,
     
     // If the citation doesn't have a URL, display the source text snippet when the source is clicked
     If(IsBlank(Url),
     
     {
     type: "Container",
     items: [
     {
     type: "TextBlock",
     text: "[" & Id & "] " & Name & " (click to see citation)",
     wrap: true,
     size: "Small",
     weight: "Lighter"
     },
     {
     type: "TextBlock",
     text: Text,
     wrap: true,
     isVisible: false,
     id: "citationText" & Id,
     size: "Small",
     isSubtle: true
     }
     ],
     selectAction: {
     type: "Action.ToggleVisibility",
     targetElements: [ "citationText" & Id ]
     }
     },
    
     // If the citation has a URL, make the citation clickable and open the source URL.
     {
     type: "TextBlock",
     text: "[" & Id &"]: [" & Name & "](" & Url & ")",
     wrap: true,
     size: "Small",
     weight: "Lighter"
     }
    
     )
     )
     },
     {
     type: "Container",
     items: [
     {
     type: "ColumnSet",
     columns: [
     {
     type: "Column",
     width: "90",
     items: [
     {
     type: "TextBlock",
     text: "AI-generated answer. Please rate it",
     wrap: true,
     size: "Small",
     color: "Accent"
     }
     ]
     },
     {
     type: "Column",
     width: "5",
     items: [
     {
     type: "TextBlock",
     text: "",
     wrap: true,
     size: "Small",
     color: "Light"
     }
     ],
     selectAction: {
     type: "Action.Submit",
     data: "This generated answer wasn't useful"
     }
     },
     {
     type: "Column",
     width: "5",
     items: [
     {
     type: "TextBlock",
     text: "",
     wrap: true,
     size: "Small",
     color: "Light"
     }
     ],
     selectAction: {
     type: "Action.Submit",
     data: "This generated answer was useful"
     }
     }
     ]
     }
     ]
     }
     ]
    }

     

     

    Note: I don't believe the thumbs up/down buttons would work in Teams as it expects a specific format for actions (Add card actions in a bot - Teams | Microsoft Learn), so you should perhaps remove them.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,658 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics