Skip to content

Commit d7a5cc1

Browse files
authored
Merge pull request MicrosoftDocs#3233 from MicrosoftDocs/canvasapp-1963670
Canvasapp Office 365 Outlook and Users updates - 1963670
2 parents d0742de + ccafff6 commit d7a5cc1

File tree

8 files changed

+64
-39
lines changed

8 files changed

+64
-39
lines changed

powerapps-docs/maker/canvas-apps/connections/connection-office365-outlook.md

Lines changed: 59 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ manager: kvivek
66
ms.service: powerapps
77
ms.topic: reference
88
ms.custom: canvas
9-
ms.date: 10/20/2017
9+
ms.date: 08/07/2020
1010
ms.author: lanced
1111
ms.reviewer: tapanm
1212
search.audienceType:
@@ -15,66 +15,80 @@ search.app:
1515
- PowerApps
1616
---
1717
# Connect to Office 365 Outlook from Power Apps
18+
1819
![Office 365 Outlook](./media/connection-office365-outlook/office365icon.png)
1920

2021
If you connect to Office 365 Outlook, you can show, send, delete, and reply to email messages, in addition to other tasks.
2122

2223
You can add controls to perform these functions in your app. For example, you can add **Text input** controls to ask for the recipient, the subject, and the body of the email, and add a **Button** control to send the email.
2324

24-
This topic shows you how to add Office 365 Outlook as a connection, add Office 365 Outlook as a data source to your app, and use this data in different controls.
25+
This article shows you how to add Office 365 Outlook as a connection, add Office 365 Outlook as a data source to your app, and use this data in different controls.
2526

2627
> [!IMPORTANT]
2728
> As of this writing, the calendar operation doesn't support recurring events.
2829
2930
[!INCLUDE [connection-requirements](../../../includes/connection-requirements.md)]
3031

3132
## Connect to Office 365 Outlook
33+
3234
1. [Add a data connection](../add-data-connection.md) and select **Office 365 Outlook**:
3335

3436
![Connect to Office 365](./media/connection-office365-outlook/add-office.png)
35-
2. Select **Connect**, and if prompted to sign in, enter your work account.
37+
38+
1. Select **Connect**, and if prompted to sign in, enter your work account.
3639

3740
The Office 365 Outlook connection has been created and added to your app. Now, it's ready to be used.
3841

3942
## Show messages
40-
1. On the **Insert** menu, select **Gallery**, and then select a **Text gallery** control.
41-
2. Set its **[Items](../controls/properties-core.md)** property to the following formula:
43+
44+
1. On the **Insert** menu, select **Gallery**, and then select a **Blank vertical** control.
45+
46+
1. Set its **[Items](../controls/properties-core.md)** property to the following formula:
4247

43-
`Office365.GetEmails({fetchOnlyUnread:false})`
48+
`Office365Outlook.GetEmails({fetchOnlyUnread:false})`
4449

4550
After changing the settings, change **Layout** to **Title, Subtitle, Body**.
4651

4752
The gallery control is automatically populated with some of your emails.
4853

49-
3. In the gallery, set the **Text** property of the first label to `ThisItem.From`. Set the second label to `ThisItem.Subject`. Set the third label to `ThisItem.BodyPreview`. You can also resize the labels.
54+
1. In the gallery, set the **Text** property of the first label to `ThisItem.From`. Set the second label to `ThisItem.Subject`. Set the third label to `ThisItem.BodyPreview`. You can also resize the labels.
5055

5156
The gallery control is automatically populated with the new properties.
52-
4. This function has several optional parameters available. Set the gallery's **Items** property to one of the following formulas:
57+
58+
1. This function has several optional parameters available. Set the gallery's **Items** property to one of the following formulas:
5359

54-
`Office365.GetEmails({fetchOnlyUnread:false})`
55-
`Office365.GetEmails({fetchOnlyUnread:false, top:2})`
56-
`Office365.GetEmails({folderPath:"Sent Items", fetchOnlyUnread:false, top:2})`
57-
`Office365.GetEmails({folderPath:"Sent Items", fetchOnlyUnread:false, top:2, searchQuery:"powerapps"})`
58-
`Office365.GetEmails({folderPath:"Deleted Items", fetchOnlyUnread:false, top:2, skip:3})`
60+
`Office365Outlook.GetEmails({fetchOnlyUnread:false})`
61+
`Office365Outlook.GetEmails({fetchOnlyUnread:false, top:2})`
62+
`Office365Outlook.GetEmails({folderPath:"Sent Items", fetchOnlyUnread:false, top:2})`
63+
`Office365Outlook.GetEmails({folderPath:"Sent Items", fetchOnlyUnread:false, top:2, searchQuery:"powerapps"})`
64+
`Office365Outlook.GetEmails({folderPath:"Deleted Items", fetchOnlyUnread:false, top:2, skip:3})`
5965

6066
## Send a message
67+
6168
1. On the **Insert** menu, select **Text**, and then select **Text input**.
62-
2. Repeat the previous step two more times so that you have three boxes, and then arrange them in a column:
69+
70+
1. Repeat the previous step 2 more times so that you have three boxes, and then arrange them in a column:
6371

6472
![Three boxes in a column](./media/connection-office365-outlook/threetextinput.png)
65-
3. Rename the controls to:
73+
74+
1. Rename the controls to:
6675

6776
* **inputTo**
6877
* **inputSubject**
6978
* **inputBody**
70-
4. On the **Insert** menu, select **Controls**, and then select **Button**. Set its **[OnSelect](../controls/properties-core.md)** property to the following formula:
79+
80+
1. On the **Insert** menu, select **Controls**, and then select **Button**. Set its **[OnSelect](../controls/properties-core.md)** property to the following formula:
7181

72-
`Office365.SendEmail(inputTo.Text, inputSubject.Text, inputBody.Text)`
73-
5. Move the button so that it appears under all the other controls, and set its **[Text](../controls/properties-core.md)** property to **"Send email"**.
74-
6. Press F5, or select the Preview button (![Preview button](./media/connection-office365-outlook/preview.png)). Type in a valid email address in **inputTo**, and type whatever you want in the other two **Text input** controls.
75-
7. Select **Send email** to send the message. Press Esc to return to the default workspace.
82+
`Office365Outlook.SendEmail(inputTo.Text, inputSubject.Text, inputBody.Text)`
83+
84+
1. Move the button so that it appears under all the other controls, and set its **[Text](../controls/properties-core.md)** property to **"Send email"**.
85+
86+
1. Press F5, or select the Preview button (![Preview button](./media/connection-office365-outlook/preview.png)). Type in a valid email address in **inputTo**, and type whatever you want in the other two **Text input** controls.
87+
88+
1. Select **Send email** to send the message. Press Esc to return to the default workspace.
7689

7790
## Send a message with an attachment
91+
7892
You can, for example, create an app in which the user takes pictures by using the device's camera and then sends them as attachments. Users can also attach many other kinds of files to an email app.
7993

8094
To add an attachment to a message, follow the steps in the previous section, but add a parameter to specify an attachment (when you set the **OnSelect** property of the button). This parameter is structured as a table in which you specify up to three properties for each attachment:
@@ -88,43 +102,53 @@ To add an attachment to a message, follow the steps in the previous section, but
88102
89103
In this example, a photo will be sent as **file1.jpg**:
90104

91-
`Office365.SendEmail(inputTo.Text, inputSubject.Text, inputBody.Text, {Attachments:Table({Name:"file1.jpg", ContentBytes:Camera1.Photo, '@odata.type':""})})`
105+
`Office365Outlook.SendEmail(inputTo.Text, inputSubject.Text, inputBody.Text, {Attachments:Table({Name:"file1.jpg", ContentBytes:Camera1.Photo, '@odata.type':""})})`
92106

93107
In this example, an audio file will be sent in addition to the photo:
94108

95-
`Office365.SendEmail(inputTo.Text, inputSubject.Text, inputBody.Text, {Attachments:Table({Name:"file1.jpg", ContentBytes:Camera1.Photo, '@odata.type':""}, {Name:"AudioFile", ContentBytes:microphone1.audio })})`
109+
`Office365Outlook.SendEmail(inputTo.Text, inputSubject.Text, inputBody.Text, {Attachments:Table({Name:"file1.jpg", ContentBytes:Camera1.Photo, '@odata.type':""}, {Name:"AudioFile", ContentBytes:microphone1.audio })})`
96110

97111
## Delete a message
112+
98113
1. On the **Insert** menu, select **Gallery**, and then select a **Text gallery** control.
99-
2. Set its **[Items](../controls/properties-core.md)** property to the following formula:
114+
115+
1. Set its **[Items](../controls/properties-core.md)** property to the following formula:
100116

101-
`Office365.GetEmails({fetchOnlyUnread:false})`
117+
`Office365Outlook.GetEmails({fetchOnlyUnread:false})`
102118

103119
The gallery control is automatically populated with some of your emails.
104-
3. In the gallery, set the **Text** property of the first label to `ThisItem.Id`. Set the second label to `ThisItem.Subject`. Set the third label to `ThisItem.Body`.
105-
4. Select the first label in the gallery, and rename it to **EmailID**:
120+
121+
1. In the gallery, set the **Text** property of the first label to `ThisItem.Id`. Set the second label to `ThisItem.Subject`. Set the third label to `ThisItem.Body`.
122+
123+
1. Select the first label in the gallery, and rename it to **EmailID**:
106124

107125
![Rename first label](./media/connection-office365-outlook/renameheading.png)
126+
108127
5. Select the third label in the gallery, and add a **Button** (**Insert** menu). Set the button's **OnSelect** property to the following formula:
109128

110-
`Office365.DeleteEmail(EmailID.Text)`
111-
6. Press F5, or select the Preview button (![Preview button](./media/connection-office365-outlook/preview.png)). Select one of the emails in your gallery, and click the button.
129+
`Office365Outlook.DeleteEmail(EmailID.Text)`
130+
131+
6. Press F5, or select the Preview button (![Preview button](./media/connection-office365-outlook/preview.png)). Select one of the emails in your gallery, and select the button.
112132

113133
> [!NOTE]
114134
> This deletes the selected email from your inbox. So, choose wisely.
135+
115136
7. Press Esc to return to the default workspace.
116137

117138
## Mark a message as read
139+
118140
This section uses the same controls as [Delete a message](connection-office365-outlook.md#delete-a-message).
119141

120142
1. Set the button's **OnSelect** property to the following formula:
121143

122-
`Office365.MarkAsRead(EmailID.Text)`
123-
2. Press F5, or select the Preview button (![Preview button](./media/connection-office365-outlook/preview.png)). Select one of the unread emails, and then click the button.
124-
3. Press Esc to return to the default workspace.
144+
`Office365Outlook.MarkAsRead(EmailID.Text)`
145+
146+
1. Press F5, or select the Preview button (![Preview button](./media/connection-office365-outlook/preview.png)). Select one of the unread emails, and then select the button.
147+
148+
1. Press Esc to return to the default workspace.
125149

126-
## Helpful links
127-
* For a list of all functions and their parameters, see the [Office 365 Outlook reference](https://docs.microsoft.com/connectors/office365connector/).
128-
* See all the [available connections](../connections-list.md).
129-
* Learn how to [manage your connections](../add-manage-connections.md).
150+
### See also
130151

152+
- For a list of all functions and their parameters, see the [Office 365 Outlook reference](https://docs.microsoft.com/connectors/office365connector/).
153+
- See all the [available connections](../connections-list.md).
154+
- Learn how to [manage your connections](../add-manage-connections.md).

powerapps-docs/maker/canvas-apps/connections/connection-office365-users.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,27 @@ ms.service: powerapps
77
ms.topic: reference
88
ms.custom: canvas
99
ms.reviewer: tapanm
10-
ms.date: 06/07/2016
10+
ms.date: 08/07/2020
1111
ms.author: lanced
1212
search.audienceType:
1313
- maker
1414
search.app:
1515
- PowerApps
1616
---
1717
# Connect to Office 365 Users connection from Power Apps
18+
1819
![Office 365 Users](./media/connection-office365-users/office365icon.png)
1920

2021
Office 365 Users lets you access user profiles in your organization using your Office 365 account. You can perform various actions such as get your profile, a user's profile, a user's manager or direct reports.
2122

2223
You can display this information in a label on your app. You can display one function, multiple functions, or even combine different functions. For example, you can create an expression that combines the User Name and Phone Number, and then display this information in your app.
2324

24-
This topic shows you how to add Office 365 Users as a connection, add Office 365 Users as a data source to your app, and use table data in a gallery control.
25+
This article shows you how to add Office 365 Users as a connection, add Office 365 Users as a data source to your app, and use table data in a gallery control.
2526

2627
[!INCLUDE [connection-requirements](../../../includes/connection-requirements.md)]
2728

2829
## Add a connection
30+
2931
1. [Add a data connection](../add-data-connection.md) and select **Office 365 Users**:
3032

3133
![Connect to Office 365](./media/connection-office365-users/add-office.png)
@@ -311,7 +313,6 @@ Search for users: Retrieves search results of user profiles.
311313
| AccountEnabled |boolean |Account enabled flag. |
312314
| BusinessPhones | string |Phone numbers of user's company.|
313315

314-
## Helpful links
316+
### See also
315317
* See all the [available connections](../connections-list.md).
316318
* Learn how to [add connections](../add-manage-connections.md) to your apps.
317-
4.56 KB
Loading
2.35 KB
Loading
-65 Bytes
Loading
-6.87 KB
Loading
5.84 KB
Loading
-8.57 KB
Loading

0 commit comments

Comments
 (0)