How to mask a field on an Adaptive Card for Input of passwords or sensitive data in Copilot Studio

Dewain Robinson
22 Apr 202408:39

Summary

TLDRThe video provides a step-by-step guide on how to use Adaptive Cards in Co-Pilot Studio to create a secure input form that masks sensitive data such as Social Security numbers. It introduces Adaptive Cards as a Microsoft technology that allows for the creation of visually appealing cards across various platforms, including non-Microsoft ones. The tutorial demonstrates using the Adaptive Cards designer to extend a card with a secure input field for SSN, utilizing JSON to define the card's structure and a regex pattern for input validation. A special 'style' attribute, set to 'password', ensures the input is masked for privacy. The video concludes with a demonstration of testing the card in Co-Pilot Studio, showing how information is captured without revealing the sensitive input to onlookers, emphasizing the importance of data protection in sensitive data entry scenarios.

Takeaways

  • πŸ“˜ Adaptive cards are a Microsoft technology that allows for the creation of various visual cards that can be rendered across different platforms, including non-Microsoft ones.
  • πŸ–₯️ You can design adaptive cards using the Adaptive Cards Designer, which can be accessed online and provides a visual interface for card creation.
  • πŸ“ To create a secure input field for sensitive data like a Social Security number, you can extend an input form card and use a regular expression pattern to validate the input.
  • πŸ”’ Adding a 'style' property with the value 'password' to an input field in an adaptive card will mask the input, displaying it as asterisks or bullets to protect sensitive information.
  • πŸ“± Adaptive cards can be used in various channels and are not limited to Microsoft products; they can also be used in iOS and Android applications.
  • πŸ’» The payload for an adaptive card is essentially JSON, which defines the structure and content of the card.
  • πŸ”— The video demonstrates how to integrate an adaptive card into a bot using CoPilot Studio, showing how to create a topic and use a trigger phrase to display the card.
  • πŸ“ When designing an adaptive card, you can include error handling for input validation, specifying what message to display if the input does not meet the required format.
  • πŸ“Š CoPilot Studio allows for the testing of adaptive cards within the platform, providing a way to review and debug the information captured from the card.
  • πŸ”„ To use the adaptive card in CoPilot Studio, you can copy the payload from the Adaptive Cards Designer and paste it into the 'Ask with Adaptive Card' node, using the 'style password' property to mask sensitive inputs.
  • πŸ“ˆ The video provides a step-by-step guide on how to create a masked input field for sensitive data within an adaptive card, enhancing user privacy and security.
  • πŸ“š The speaker encourages viewers to like and subscribe for more educational content on CoPilot Studio and to try out CoPilot Studio using the provided link.

Q & A

  • What is an Adaptive card?

    -An Adaptive card is a Microsoft technology that allows the creation of various visual cards that can be rendered through different channels, including Microsoft and non-Microsoft products like iOS and Android.

  • Where can one find more information and examples of Adaptive cards?

    -One can find more information and examples of Adaptive cards on the Adaptive cards website, Adaptivecards.io.

  • How is an Adaptive card built?

    -An Adaptive card is built using a designer tool where you can create new cards by selecting from various card types, such as input forms.

  • What is the purpose of using a 'style' attribute with the value 'password' in an Adaptive card?

    -The 'style' attribute with the value 'password' is used to mask the input field, such as a Social Security number, so that it displays asterisks (*) or a similar mask by default, protecting sensitive data from being seen.

  • How does one extend an Adaptive card to include sensitive data fields like a Social Security number?

    -To extend an Adaptive card for sensitive data, one would add an input text field with a label and a regex pattern that matches the format of the sensitive data, and then apply the 'style' attribute with the value 'password' to mask the input.

  • What is the JSON payload in the context of an Adaptive card?

    -The JSON payload is the data structure that defines the Adaptive card's content and layout, including input fields and their properties.

  • How does one handle error messages in an Adaptive card input field?

    -Error messages are handled by specifying a condition in the JSON payload that defines how the error message should be displayed if the input does not meet the required format.

  • What is CoPilot Studio and how does it relate to Adaptive cards?

    -CoPilot Studio is a platform where one can create topics and integrate Adaptive cards. It allows for the creation of interactive flows where Adaptive cards can be used to collect and display information.

  • How can one test the functionality of an Adaptive card in CoPilot Studio?

    -In CoPilot Studio, one can test the functionality of an Adaptive card by creating a topic with a trigger phrase, using a question node to stop the flow and review the captured information, and then executing the topic to see the card in action.

  • What is the benefit of using a masked interface for sensitive data input in an Adaptive card?

    -The benefit of using a masked interface is that it protects sensitive data from being seen by others, such as when someone looks over the user's shoulder, thus enhancing privacy and security.

  • How can one ensure that the sensitive data entered in an Adaptive card is captured correctly in CoPilot Studio?

    -One can ensure the data is captured correctly by using topic level variables and reviewing them in the variable watcher after the user submits the form in CoPilot Studio.

  • What is the significance of using regex patterns in Adaptive card input fields?

    -Regex patterns are significant as they validate the format of the input data, ensuring that it conforms to a specific structure, such as the format of a Social Security number.

Outlines

00:00

πŸ“˜ Introduction to Adaptive Cards and Masking Sensitive Data

The video begins by introducing Adaptive Cards, a Microsoft technology that allows for the creation of various visual cards compatible with multiple platforms, including non-Microsoft ones. The speaker guides viewers to Adaptivecards.io for more information and examples. An Adaptive Card designer is available for creating cards, and the video demonstrates extending a card to include sensitive information fields like a Social Security number. The process involves using JSON to define card elements and input validation through regular expressions. The speaker also discusses error handling for input fields and concludes by showing how to implement the card in Co-Pilot Studio, a platform for building conversational AI experiences.

05:01

πŸ”’ Masking Sensitive Input Fields in Co-Pilot Studio

This paragraph explains how to mask sensitive data input fields in Co-Pilot Studio using Adaptive Cards. The speaker demonstrates adding a style attribute with the value 'password' to an input field, which changes the behavior to hide the input, typically used for Social Security numbers or other sensitive information. The video shows testing the card within Co-Pilot Studio, ensuring that the information is captured and masked as intended. The speaker uses a question node to debug and verify that the data is being collected correctly. By entering information into the masked fields, the video illustrates how the data remains hidden from view, providing a secure method for users to enter sensitive data. The video concludes with a reminder to review collected variables in the variable picker and an invitation to try Co-Pilot Studio.

Mindmap

Keywords

πŸ’‘Adaptive Card

Adaptive Cards are a Microsoft technology that allows developers to create interactive, richly formatted cards that can be rendered across various platforms and channels, including both Microsoft and non-Microsoft products. They are used to display content in a structured and visually appealing way. In the video, the creator uses Adaptive Cards to build a form that includes fields for sensitive data like Social Security numbers.

πŸ’‘Co-Pilot Studio

Co-Pilot Studio is a platform where users can design and implement conversational AI experiences, such as chatbots. In the context of the video, Co-Pilot Studio is used to create a topic that triggers the display of an Adaptive Card, allowing users to input sensitive information in a secure manner.

πŸ’‘Sensitive Data

Sensitive data refers to information that requires a higher level of security due to its private or confidential nature. In the video, the creator discusses the importance of protecting sensitive data like Social Security numbers when inputting them through Adaptive Cards.

πŸ’‘Masking Input

Masking input is a security feature that hides the characters entered by a user in a form field, typically used for sensitive information like passwords or credit card numbers. In the video, the creator demonstrates how to mask the Social Security number input field in an Adaptive Card to protect user privacy.

πŸ’‘JSON

JSON (JavaScript Object Notation) is a lightweight data interchange format that is easy for humans to read and write and easy for machines to parse and generate. In the video, the creator discusses the JSON payload used to define the structure and content of the Adaptive Card.

πŸ’‘Regular Expression (Regex)

A regular expression (regex) is a sequence of characters that forms a search pattern, primarily used for string matching in programming. In the context of the video, the creator uses a regex pattern to validate the format of the Social Security number input.

πŸ’‘Error Handling

Error handling refers to the process of responding to the occurrence of various types of operational faults that may occur during the execution of a software program. In the video, the creator sets up an error message that is displayed if the input does not match the required format.

πŸ’‘Dynamic Content

Dynamic content refers to web page content that changes while a user is viewing a web page before requesting a new one from the server. In the video, the creator mentions the option to convert static JSON content into a formula for dynamic Adaptive Cards, although for the purpose of the tutorial, a static card is used.

πŸ’‘Payload

In the context of computing networks, a payload refers to the data that is being transmitted over a network in addition to the necessary protocol information. In the video, the term is used to describe the JSON data that defines the Adaptive Card's structure and content.

πŸ’‘Style Password

The 'style password' property in Adaptive Cards is used to make an input field behave like a password field, where the input is masked. In the video, the creator adds 'style password' to the Social Security number input field to ensure the input is hidden for privacy.

πŸ’‘Variable Watcher

A variable watcher is a tool used in debugging to monitor the values of variables during the execution of a program. In the video, the creator uses a question node to create a breakpoint and review the captured information in the variable watcher to demonstrate that the sensitive data has been collected.

Highlights

Adaptive cards are a Microsoft technology that allows the creation of various visual cards.

Adaptive cards can be rendered through different channels and are compatible with Microsoft and non-Microsoft products.

Adaptivecards.io provides a wealth of information and examples on how to use Adaptive cards.

There is a designer tool within Adaptive cards where users can create visual cards by selecting different card types.

The video demonstrates extending an Adaptive card to include sensitive data fields like Social Security numbers.

The payload for an Adaptive card is in JSON format, which can be customized for specific input fields.

A regular expression pattern is used to validate the format of input data like a Social Security number.

Error handling for input validation can be specified within the card's JSON payload.

To mask sensitive input fields, the 'style' property with a value of 'password' can be added to the input field.

Co-Pilot Studio allows for the creation of topics and nodes to trigger Adaptive card interactions.

The payload from the Adaptive card designer can be copied and pasted into Co-Pilot Studio for use in a topic.

Adding 'style password' to an input field in an Adaptive card masks the input, displaying asterisks instead of text.

Co-Pilot Studio provides a way to test and debug Adaptive card inputs using topic level variables.

Sensitive data entered into masked fields in Adaptive cards is protected from being seen by others.

The video provides a step-by-step guide on how to create and use Adaptive cards with masked fields in Co-Pilot Studio.

The use of 'style password' is a common practice for protecting sensitive data inputs in various fields, not just Social Security numbers.

The video concludes with a demonstration of how to execute and review the collected information from an Adaptive card.

Co-Pilot Studio offers a platform for building interactive and dynamic Adaptive card experiences.

The video encourages viewers to like, subscribe, and try Co-Pilot Studio for more educational content.

Transcripts

play00:00

in this video I'm going to show you how

play00:02

to mask a field on an Adaptive card when

play00:05

you want to protect the input for

play00:07

sensitive data in co-pilot studio so

play00:10

let's first talk about what is an

play00:12

Adaptive card if you don't know what an

play00:14

Adaptive card is you can go to Adaptive

play00:17

cards.io and basically this is a

play00:20

Microsoft Technology that allows you to

play00:22

be able to build all these different uh

play00:25

visual cards that can be rendered

play00:27

through different channels um through

play00:30

out different Microsoft products or even

play00:31

non-microsoft products as well like even

play00:34

IOS and Android and so you can kind of

play00:37

see here in the little video that plays

play00:39

on the Adaptive card site that they've

play00:41

got a ton of information here and you

play00:42

can even scroll down and see examples of

play00:45

how you might be able to use these um as

play00:48

well this has been around since the bot

play00:50

framework days uh and such so this is a

play00:53

very common uh platform for people to

play00:56

want to build visual cards now in order

play00:59

to be able to build visual cards There's

play01:01

an actual designer right here that you

play01:04

can go to so let's take a look at the

play01:10

designer okay so over here I have

play01:14

designed this card inside of the adopter

play01:17

cards designer and you can do this by

play01:19

clicking on new card and picking one of

play01:22

the cards that you might want in the

play01:24

case of what we're playing with we're

play01:25

playing with this one right here which

play01:26

is the input form and so let's take a

play01:29

look look here at what I've done to this

play01:31

card so when we have these cards you

play01:34

might have a situation where you want

play01:36

like your name or your email address and

play01:39

your phone number I've extended this

play01:41

card to include something secure like

play01:43

your Social Security number so let's

play01:45

look at how I extended that card by just

play01:48

scrolling down over here and looking at

play01:50

the code behind this so you can see here

play01:53

that this is the uh basically the

play01:56

payload uh for the actual uh adaptive

play01:59

card which is basically Json and if you

play02:02

notice if you scroll down let's just

play02:05

find where I do you can see the email

play02:07

you can see the telephone number but

play02:09

here you can see that there's an input

play02:12

text field that said that I've called my

play02:15

SSN now you'll see here that I put a

play02:18

label so it will say social security

play02:20

number and it displays the format in

play02:22

which you want it and then down here

play02:24

there's a Rex pattern that's being used

play02:27

now in this case you can almost just

play02:30

copy the phone number because it's

play02:31

social security number the only real

play02:32

difference is that you actually have a

play02:35

separation here um within it that

play02:39

basically has uh two numbers instead so

play02:41

in order to be able to get this format

play02:43

you'll see here that basically I've said

play02:46

okay I need to have 0 to9 three digits

play02:49

and then I've got uh another one that is

play02:52

0 to9 two digits followed by another one

play02:55

that's 0 to 9 for four digits and then I

play02:58

put in here that if I I have an error

play03:00

message how do I want to handle the

play03:02

error message and you'll see here that I

play03:04

went in and I said this if it doesn't

play03:07

meet that format this is what I want it

play03:09

to say and you can see that I've told it

play03:11

to do this now you can literally just

play03:13

copy this whole section right here uh

play03:16

when you go about it but I'm going to

play03:19

show you the one last little thing that

play03:21

you need to do to be able to make this

play03:24

uh land uh with with it not being

play03:28

formatted uh where it shows the text so

play03:31

we want it to actually just show like

play03:33

Asters or something like that so let's

play03:36

go take a look at what I did inside of

play03:38

copilot studio

play03:41

so now we're inside of copilot studio

play03:45

and what I'm going to do now is I'm

play03:46

going to go in and show you that I

play03:48

created a topic and this topic I created

play03:51

is called show adaptive card and I just

play03:53

said with a trigger phrase here to show

play03:56

an Adaptive card as the phrase so that's

play03:59

what I can type and it will fire this up

play04:02

now you'll notice here that this is

play04:04

where I went in and they said I want to

play04:06

ask with adaptive card so if you come in

play04:08

here and you say ask with adaptive card

play04:11

right there it will create this node for

play04:13

you and so with that what I did in this

play04:17

particular node let's expand this and

play04:19

let's look at the properties on it and

play04:22

what you're going to notice here and

play04:23

I'll just move this over so you can kind

play04:25

of see it is that I took the payload

play04:28

from the adapter card designer which is

play04:31

you want to grab this text right here

play04:34

like all of this and you want to grab

play04:38

that and you want to drop it in to this

play04:42

location now notice that it says edit

play04:44

Json you can convert this to a formula

play04:47

if you want it to be a dynamic adaptive

play04:49

card and all of that but in this case

play04:52

what we want to do is we want to just

play04:53

look at a regular adaptive card where

play04:55

there is no Dynamic content and you'll

play04:58

notice that we have follow this format

play05:00

just like we had before but I did

play05:02

something special whenever we built this

play05:05

out you'll notice here that I added a

play05:08

style and the style was password and by

play05:12

adding style password to the end just

play05:15

like you can see style tell or style

play05:18

email but when you say style password

play05:21

you're going to get a different uh

play05:23

Behavior so now that I've saved this

play05:25

notice that I'll show you what I did to

play05:27

be able to test this just so you can see

play05:29

this you'll see here your information

play05:31

has been submitted so that after I hit

play05:33

the submit button this goes to there and

play05:36

then I put a question node here and now

play05:39

why did I put a question Noe I put a

play05:41

question Noe here because I want to

play05:43

debug this to show you that it's

play05:45

capturing the information because these

play05:47

are all topic level variables so if I

play05:50

just end the topic without doing

play05:52

anything with it you won't be able to

play05:54

see it in the variable Watcher so that's

play05:56

why I did this just so that we have a

play05:58

stop point and then then we have the end

play06:00

the topic so now let's actually execute

play06:02

this and here I'll turn on tracking so

play06:04

that you can see it and if I say show an

play06:10

Adaptive

play06:15

card and you see it rendered the card

play06:18

now if I come in here and I need to

play06:20

follow the formatting again I need to

play06:22

say like

play06:24

Robinson Dwayne in this my email let's

play06:28

just say me at at

play06:31

home.com and then phone number let's

play06:34

just use um let's do

play06:38

555 Das one 2 3 dash 1 2 3

play06:45

4 and then we'll get to the social

play06:48

security number and in this case I need

play06:50

to be able to get that same format so

play06:53

what I'm going to do is I'm going to

play06:54

type it in and I'm just going to fill

play06:56

this with ones I'm just going to say one

play06:58

one one

play07:00

dash one one dash one one one one so

play07:06

that should be completely masked and you

play07:09

can see here that I've got these bullet

play07:11

points now now you can click this to be

play07:13

able to see the information behind the

play07:15

scenes just like any type of masked uh

play07:18

interface but the idea here is to make

play07:21

that where that's masked so that you

play07:22

can't see it by default now once I hit

play07:25

submit on this you'll see here now would

play07:29

you like to review the variables in the

play07:30

case of this I I want to review the

play07:32

variables so let's look at the variable

play07:34

picker and let's go up to the test and I

play07:37

want to look at topics and notice right

play07:40

here you can see that I actually did

play07:42

collect all the information that we

play07:45

entered in just a minute ago so the idea

play07:48

here is that this allows you to be able

play07:51

to mask this so that the user when

play07:53

they're typing it in that someone can't

play07:55

look over their shoulder and see this

play07:57

this is a common thing for

play08:00

uh people who are entering in uh

play08:02

situations where they have sensitive

play08:04

data that they want to protect and you

play08:06

can do this on social security number

play08:08

any field as long as you give it that

play08:10

style of password it's going to make it

play08:13

where it displays it in a masked

play08:15

interface so I hope this was actually

play08:18

helpful because a lot of people have

play08:20

been asking how to do this I hope you

play08:23

enjoyed today's video and as always you

play08:26

can like And subscribe to my channel for

play08:27

more educational content on copilot

play08:30

studio and as always you can try copilot

play08:33

Studio at

play08:35

aka.ms TR copilot Studio

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
Adaptive CardsCo-Pilot StudioData ProtectionSensitive DataInput MaskingMicrosoft TechnologyVisual CardsCard DesignUser InterfaceData SecurityVideo Tutorial