{"id":6506,"date":"2021-06-28T10:52:55","date_gmt":"2021-06-28T18:52:55","guid":{"rendered":"https:\/\/officedevblogs.wpengine.com\/?p=6506"},"modified":"2021-06-28T10:52:55","modified_gmt":"2021-06-28T18:52:55","slug":"manage-frontline-workers-in-microsoft-teams-with-tags-and-time-clock-apis","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/manage-frontline-workers-in-microsoft-teams-with-tags-and-time-clock-apis\/","title":{"rendered":"Manage frontline workers in Microsoft Teams with Tags and Time Clock APIs"},"content":{"rendered":"<p>With more and more businesses turning to Microsoft Teams to manage their frontline workers in their day-to-day shifts, the need for streamlined communication and time management experiences became top of mind. So, we are excited to announce the general availability of new Microsoft Graph APIs for managing Tags and Time Clock in Teams! In this post, we\u2019ll cover some of the scenarios where these APIs come in handy and show some of the code snippets that developers like you can leverage.<\/p>\n<h4><strong>Use Tag APIs to help workers reach a group of people quickly by simply referencing a tag<\/strong><\/h4>\n<p>Tags in Teams let users quickly reach a group of people without having to @mention or type out everyone. Users can use tags to start a chat or to by @mentioning a tag in a channel post. You can integrate these APIs into your apps to enable scenarios such as helping retail store managers connect with workers in specific departments quickly.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-6515\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Teams-tags-1.1-493x1024.png\" alt=\"Image in the mobile app view showing a tag group\" width=\"250\" height=\"519\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Teams-tags-1.1-493x1024.png 493w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Teams-tags-1.1-144x300.png 144w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Teams-tags-1.1.png 528w\" sizes=\"(max-width: 250px) 100vw, 250px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-6511\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Teams-tags-2.png\" alt=\"Image on a mobile device showing a tag group created for Design Leads\" width=\"700\" height=\"493\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Teams-tags-2.png 936w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Teams-tags-2-300x211.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Teams-tags-2-768x541.png 768w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Now, with this set of Tag APIs, developers can programmatically assign users tags in a team, making tag creation and maintenance faster and easier.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-6508\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Teams-tags-3.png\" alt=\"Image of project team within the Microsoft Teams \u2018manage team\u2019 setting showing tags as a field\" width=\"700\" height=\"337\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Teams-tags-3.png 936w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Teams-tags-3-300x144.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Using these new APIs, you can now:<\/p>\n<ul>\n<li>Create tags in a team and assign users<\/li>\n<li>Get a list of tags in a team<\/li>\n<li>Update tags<\/li>\n<li>Delete tags<\/li>\n<\/ul>\n<p>First, you can start testing these new Tags APIs by using the\u00a0<a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/graph-explorer\">Microsoft Graph Explorer<\/a>.<\/p>\n<p>As an example, here\u2019s a sample on how to create a \u2018Finance\u2019 tag for two users within a team:<\/p>\n<h3>Request<\/h3>\n<p>HTTPCopy<\/p>\n<pre class=\"lang: decode:true\">POST https:\/\/graph.microsoft.com\/beta\/teams\/53c53217-fe77-4383-bc5a-ed4937a1aecd\/tags\n\nContent-Type: application\/json\u00a0\n\n{\n\n\u00a0 \u00a0 \"displayName\": \"Finance\",\u00a0\n\n\u00a0 \u00a0 \"description\": \"The Contoso Finance Team for the Mark 8 Project\",\u00a0\n\n\u00a0 \u00a0 \"members\":[\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0{\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"userId\":\"92f6952f-61ca-4a94-8910-508a240bc167\"\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0},\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0{\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"userId\":\"085d800c-b86b-4bfc-a857-9371ad1caf29\"\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0}\u00a0\n\n\u00a0 ]\n\n}<\/pre>\n<h4>Response<\/h4>\n<p>HTTPCopy<\/p>\n<pre class=\"lang: decode:true \">HTTP\/1.1 201 Created\n\nContent-Type: application\/json\u00a0\n\n{\u00a0\n\n\u00a0 \u00a0 \u00a0 \"@odata.type\": \"#Microsoft.Teams.GraphSvc.teamworkTag\",\u00a0\n\n\u00a0 \u00a0 \u00a0 \"id\": \"MjQzMmI1N2ItMGFiZC00M2RiLWFhN2ItMTZlYWRkMTE1ZDM0IyM3ZDg4M2Q4Yi1hMTc5LTRkZDctOTNiMy1hOGQzZGUxYTIxMmUjI3RhY29VSjN2RGk==\",\u00a0\n\n\u00a0 \u00a0 \"teamId\": \"53c53217-fe77-4383-bc5a-ed4937a1aecd\",\u00a0\n\n\u00a0 \u00a0 \"displayName\": \" Finance\",\u00a0\n\n\u00a0 \u00a0\"description\":\n\n\u00a0 \u00a0\" The Contoso Finance Team for the Mark 8 Project\",\u00a0\n\n\u00a0 \u00a0\"memberCount\": \"2\",\u00a0\n\n\u00a0 \u00a0\"tagType\": \"standard\"\n\n}<\/pre>\n<p><em>Note: Tags Graph APIs currently support Application Permissions in Public Preview. Delegated Permissions are only supported in Private Preview but are coming soon to Public Preview. <\/em><\/p>\n<p>For more information on how to use these new Tag APIs, check out <a href=\"https:\/\/docs.microsoft.com\/en-us\/graph\/api\/resources\/teamworktag?view=graph-rest-beta\" target=\"_blank\" rel=\"noopener noreferrer\">our technical documentation<\/a>.<\/p>\n<h4><strong>Leverage the Time Clock APIs to manage key time management scenarios<\/strong><\/h4>\n<p>Just like how coffee is fundamental to starting the day, clocking-in to one\u2019s shift is fundamental for factory workers. The end user experience for Time Clock enables your frontline team to clock in and out of a shift with a mobile device, on web or on a desktop to making clocking and time tracking easier for both the frontline worker and manager.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-6507\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Teams-tags-4.png\" alt=\"Image showing a notification within the Teams client notifying the user of their break and another image showing a start\/stop time clock that the user uses to record time spent on break. \" width=\"500\" height=\"495\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Teams-tags-4.png 647w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Teams-tags-4-300x297.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Teams-tags-4-150x150.png 150w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Teams-tags-4-24x24.png 24w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Teams-tags-4-48x48.png 48w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Teams-tags-4-96x96.png 96w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>Now, with new Time Clock APIs, organizations can create rules such as how late someone can clock-in without requiring manager approval or requiring a health screening survey before clocking-in for the day.<\/p>\n<p>Using these new APIs, developers can now<\/p>\n<ul>\n<li>Clock in<\/li>\n<li>Clock out<\/li>\n<li>Start and stop a break<\/li>\n<li>Create a timecard with clock in details<\/li>\n<li>Get a list of timecards in a team<\/li>\n<li>Update timecards<\/li>\n<li>Delete timecards<\/li>\n<li>Enable location detection for clock in<\/li>\n<li>Enable real time sync notifications when a user clocks in using Teams<\/li>\n<\/ul>\n<p><strong><em><u>To get started\u2026<\/u><\/em><\/strong><\/p>\n<p>First, you can test these new Timeclock APIs using the\u00a0<a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/graph-explorer\">Microsoft Graph Explorer<\/a>.<\/p>\n<p>Let\u2019s look at how to create a timecard entry for the user (Irvin Sayers) below:<\/p>\n<h4>Request<\/h4>\n<p><strong><em><u>To get started\u2026<\/u><\/em><\/strong><\/p>\n<p>First, you can test these new Timeclock APIs using the\u00a0<a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/graph-explorer\">Microsoft Graph Explorer<\/a>.<\/p>\n<p>Let\u2019s look at how to create a timecard entry for the user (Irvin Sayers) below:<\/p>\n<pre class=\"lang: decode:true \">POST https:\/\/graph.microsoft.com\/beta\/teams\/871dbd5c-3a6a-4392-bfe1-042452793a50\/schedule\/timecards\n\n{\n\n\u00a0 \"onBehalfOfUserId\":\"a3601044-a1b5-438e-b742-f78d01d68a67\",\n\n\u00a0 \"clockInEvent\":{\n\n\u00a0\u00a0\u00a0\u00a0 \"dateTime\":\"2019-03-18T00:00:00.000Z\",\n\n\u00a0\u00a0\u00a0\u00a0 \"atApprovedLocation\":true,\n\n\u00a0\u00a0 \u00a0\u00a0\"notes\": {\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"content\": \"Started late due to traffic in CA 237\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"contentType\": \"text\"\n\n\u00a0\u00a0\u00a0\u00a0 },\n\n\u00a0 },\n\n\u00a0 \"notes\":{\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"content\": \"8 To 5 Inventory management\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"contentType\": \"text\"\n\n\u00a0\u00a0 },\n\n\u00a0 \"breaks\":[\n\n\u00a0\u00a0\u00a0\u00a0 {\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"breakId\": \"string\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"notes\":{\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"content\": \"Lunch break\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"contentType\": \"text\"\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 },\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"start\":{\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"dateTime\":\"2019-03-18T02:00:00.000Z\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"atApprovedLocation\":true,\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"notes\": {\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\"content\": \"Reduced break to make up for lost time\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"contentType\": \"text\"\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 },\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\n\n\u00a0\u00a0\u00a0\u00a0 }\n\n\u00a0 ]\n\n}<\/pre>\n<h4>Response<\/h4>\n<p>Here\u2019s a successful response.<\/p>\n<pre class=\"lang: decode:true \">HTTP\/1.1 201 Created\n\n{\n\n\u00a0\u00a0 \"id\":\"3895809b-a618-4c0d-86a0-d42b25b7d74f\",\n\n\u00a0\u00a0 \"userId\":\"a3601044-a1b5-438e-b742-f78d01d68a67\",\n\n\u00a0\u00a0 \"createdDateTime\":\"2019-03-18T00:00:00.000Z\",\n\n\u00a0\u00a0 \"createdBy\":{\n\n\u00a0\u00a0\u00a0\u00a0\u00a0 \"user\":{\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"id\":\"a3601044-a1b5-438e-b742-f78d01d68a67\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"displayName\":\"Irvin Sayers\"\n\n\u00a0\u00a0\u00a0\u00a0\u00a0 }\n\n\u00a0\u00a0 },\n\n\u00a0\u00a0 \"lastModifiedDateTime\":\"2019-03-18T00:00:00.000Z\",\n\n\u00a0\u00a0 \"lastModifiedBy\":{\n\n\u00a0\u00a0\u00a0\u00a0\u00a0 \"user\":{\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"id\":\"a3601044-a1b5-438e-b742-f78d01d68a67\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"displayName\":\"Irvin Sayers\"\n\n\u00a0\u00a0\u00a0\u00a0\u00a0 }\n\n\u00a0\u00a0 },\n\n\u00a0\u00a0 \"state\":\"onBreak\",\n\n\u00a0\u00a0 \"confirmationStatus\":\"notConfirmed\",\n\n\u00a0\u00a0 \"originalEntry\":{\n\n\u00a0\u00a0\u00a0\u00a0\u00a0 \"clockInEvent\":{\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"dateTime\":\"2019-03-18T00:00:00.000Z\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"atApprovedLocation\":true,\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"notes\": {\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"content\": \"Started late due to traffic in CA 237\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"contentType\": \"text\"\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 },\n\n\u00a0\u00a0\u00a0\u00a0\u00a0 },\n\n\u00a0\u00a0\u00a0\u00a0\u00a0 \"clockOutEvent\":null,\n\n\u00a0\u00a0\u00a0\u00a0\u00a0 \"breaks\":[\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"breakId\":\"string\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"notes\":{\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"content\": \"Lunch break\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"contentType\": \"text\"\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 },\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"start\":{\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"dateTime\":\"2019-03-18T02:00:00.000Z\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"atApprovedLocation\":true,\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"notes\": {\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"content\": \"Reduced break to make up for lost time\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"contentType\": \"text\"\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 },\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 },\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"end\":null\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\n\n\u00a0\u00a0\u00a0\u00a0\u00a0 ]\n\n\u00a0\u00a0 },\n\n\u00a0\u00a0 \"clockInEvent\":{\n\n\u00a0\u00a0\u00a0\u00a0\u00a0 \"dateTime\":\"2019-03-18T00:00:00.000Z\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0 \"atApprovedLocation\":true,\n\n\u00a0\u00a0\u00a0\u00a0\u00a0 \"notes\": {\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"content\": \"Started late due to traffic in CA 237\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"contentType\": \"text\"\n\n\u00a0\u00a0\u00a0\u00a0 },\n\n\u00a0\u00a0 },\n\n\u00a0\u00a0 \"clockOutEvent\":null,\n\n\u00a0\u00a0 \"notes\":{\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"content\": \"8 To 5 Inventory management\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"contentType\": \"text\"\n\n\u00a0\u00a0 },\n\n\u00a0\u00a0 \"breaks\":[\n\n\u00a0\u00a0\u00a0\u00a0\u00a0 {\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"breakId\":\"string\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"notes\":{\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"content\": \"Lunch break\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"contentType\": \"text\"\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 },\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"start\":{\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"dateTime\":\"2019-03-18T02:00:00.000Z\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"atApprovedLocation\":true,\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"notes\": {\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"content\": \"Reduced break to make up for lost time\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"contentType\": \"text\"\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 },\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 },\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\"end\":null\n\n\u00a0\u00a0\u00a0\u00a0\u00a0 }\n\n\u00a0\u00a0 ]\n\n}<\/pre>\n<p>Here\u2019s another example on how to enable synchronous change notifications when a user clocks in using the Shifts app within Teams. For this, add <em>timecard<\/em> as the value for the <em>supportedEntities<\/em> property using the <a href=\"https:\/\/docs.microsoft.com\/en-us\/graph\/api\/workforceintegration-update?view=graph-rest-1.0&amp;tabs=http\">Workforce Integration API<\/a>.<\/p>\n<h4>Request<\/h4>\n<pre class=\"lang: decode:true \">POST https:\/\/graph.microsoft.com\/v1.0\/teamwork\/workforceIntegrations\/\n\n{\n\n\u00a0 \"displayName\": \"ABCWorkforceIntegration\",\n\n\u00a0 \"apiVersion\": 1,\n\n\u00a0 \"isActive\": true,\n\n\u00a0 \"encryption\": {\n\n\u00a0\u00a0\u00a0 \"protocol\": \"sharedSecret\",\n\n\u00a0\u00a0\u00a0 \"secret\": \"My Secret\"\n\n\u00a0 },\n\n\u00a0 \"url\": \"https:\/\/ABCWorkforceIntegration.com\/Contoso\/\",\n\n\u00a0 \"supportedEntities\": \"Shift,SwapRequest,Timecard\"\n\n}\n\nAuthorization: Bearer {token}\n\nContent-type: application\/json<\/pre>\n<h4>Response<\/h4>\n<pre class=\"lang: decode:true \">HTTP\/1.1 200 OK\n\nContent-type: application\/json\n\n{\n\n\u00a0 \"id\": \"c5d0c76b-80c4-481c-be50-923cd8d680a1\",\n\n\u00a0 \"displayName\": \"ABCWorkforceIntegration\",\n\n\u00a0 \"apiVersion\": 1,\n\n\u00a0 \"isActive\": true,\n\n\u00a0 \"encryption\": {\n\n\u00a0\u00a0\u00a0 \"protocol\": \"sharedSecret\",\n\n\u00a0\u00a0\u00a0 \"secret\": null\n\n\u00a0 },\n\n\u00a0 \"url\": \"https:\/\/abcWorkforceIntegration.com\/Contoso\/\",\n\n\u00a0 \"supportedEntities\": \"Shift,SwapRequest,Timecard\"\n\n}<\/pre>\n<p>For more information on how to use these new Time Clock APIs, check out <a href=\"https:\/\/docs.microsoft.com\/en-us\/graph\/api\/resources\/timecard?view=graph-rest-beta\">our technical documentation.<\/a><\/p>\n<p>We are excited to see all the great scenarios that you can integrate within your apps using these new APIs! As you start using these, please <a href=\"https:\/\/microsoftteams.uservoice.com\/forums\/555103-public?category_id=357367\" target=\"_blank\" rel=\"noopener noreferrer\">provide any feedback<\/a> that can help us improve the experience.<\/p>\n<p>Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn about some scenarios where these APIs come in handy and view the code snippets that you can leverage to manage Tags and Time Clock in Teams.<\/p>\n","protected":false},"author":69074,"featured_media":25159,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3,128],"tags":[],"class_list":["post-6506","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-graph","category-microsoft-teams"],"acf":[],"blog_post_summary":"<p>Learn about some scenarios where these APIs come in handy and view the code snippets that you can leverage to manage Tags and Time Clock in Teams.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/6506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/69074"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=6506"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/6506\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/25159"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=6506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=6506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=6506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}