{"id":5816,"date":"2025-02-17T09:00:45","date_gmt":"2025-02-17T07:00:45","guid":{"rendered":"https:\/\/www.msb365.blog\/?p=5816"},"modified":"2025-02-17T09:00:45","modified_gmt":"2025-02-17T07:00:45","slug":"microsoft-teams-presence-report","status":"publish","type":"post","link":"https:\/\/www.msb365.blog\/?p=5816","title":{"rendered":"Microsoft Teams Presence Report"},"content":{"rendered":"<p data-sourcepos=\"3:1-3:306\">I\u2019m excited to share a new PowerShell script I\u2019ve developed that dives into Microsoft Teams presence data and generates a graphical report. This script allows you to analyze user presence within your tenant over the past week, offering valuable insights into how your teams are engaging and collaborating.<\/p>\n<p data-sourcepos=\"5:1-5:406\">Understanding user presence in Microsoft Teams can be incredibly useful. Whether you\u2019re looking to optimize meeting schedules, understand team workload distribution, or simply gain a better overview of communication patterns, having access to this data can be a game-changer. While Teams offers real-time presence information, historical data can be harder to come by. That\u2019s where this script comes in.<\/p>\n<h3 data-sourcepos=\"7:1-7:28\">What does the script do?<\/h3>\n<p data-sourcepos=\"9:1-9:319\">This PowerShell script connects to your Microsoft Teams environment and retrieves presence data for all users over the last seven days. It then processes this data and generates a graphical report visualizing each user\u2019s presence status throughout the week. This provides a clear, at-a-glance view of presence trends.<\/p>\n<h3 data-sourcepos=\"11:1-11:30\">Key Features and Benefits:<\/h3>\n<ul data-sourcepos=\"13:1-19:0\">\n<li data-sourcepos=\"13:1-13:94\"><strong>Historical Data:<\/strong> Analyze presence trends over a full week, not just the current status.<\/li>\n<li data-sourcepos=\"14:1-14:90\"><strong>Per-User Breakdown:<\/strong> See detailed presence information for each user in your tenant.<\/li>\n<li data-sourcepos=\"15:1-15:115\"><strong>Graphical Reporting:<\/strong> Visualize the data with easy-to-understand charts and graphs, making analysis a breeze.<\/li>\n<li data-sourcepos=\"16:1-16:127\"><strong>Insights into Collaboration:<\/strong> Gain a better understanding of how your teams are interacting and when they\u2019re most active.<\/li>\n<li data-sourcepos=\"17:1-17:103\"><strong>Optimized Scheduling:<\/strong> Use the data to inform meeting schedules and ensure maximum participation.<\/li>\n<li data-sourcepos=\"18:1-19:0\"><strong>Workload Management:<\/strong> Identify potential imbalances in workload distribution based on presence patterns.<\/li>\n<\/ul>\n<p>\u00a0<\/p>\n<h3 data-sourcepos=\"20:1-20:30\">How it Works (High-Level):<\/h3>\n<p data-sourcepos=\"22:1-22:303\">The script leverages the Microsoft Graph API to access Teams presence information. It authenticates with your tenant, retrieves the necessary data for each user, and then processes it to create the graphical report. The report can be customized to include specific metrics or visualizations as needed.<\/p>\n<h4 data-sourcepos=\"28:1-28:40\">Technical Details (for the curious):<\/h4>\n<ul data-sourcepos=\"30:1-33:0\">\n<li data-sourcepos=\"30:1-30:82\"><strong>PowerShell Modules:<\/strong> The script utilizes the Microsoft Graph PowerShell SDK.<\/li>\n<li data-sourcepos=\"31:1-31:87\"><strong>Authentication:<\/strong> You\u2019ll need to authenticate with your Microsoft 365 credentials.<\/li>\n<\/ul>\n<p>\u00a0<\/p>\n<h3>Download the Script<\/h3>\n<p>As always, although I have tested and used the script several times, I cannot and will not accept any liability for the use of this script.<br \/>\nReaders who download the script are free to customize it according to their needs. Commercial use is allowed, but monetarization requires my explicit permission.<\/p>\n<div class=\"vlp-link-container vlp-layout-basic\"><a href=\"https:\/\/github.com\/MSB365\/Teams_PresenceReport\/tree\/main\" class=\"vlp-link\" title=\"GitHub - MSB365\/Teams_PresenceReport\" rel=\"nofollow\" target=\"_blank\"><\/a><div class=\"vlp-layout-zone-side\"><div class=\"vlp-block-2 vlp-link-image\"><img decoding=\"async\" src=\"https:\/\/opengraph.githubassets.com\/26ec460e88c88ad557d2077bdfb7f8da74c91b9285bf411d7b08a266624e68eb\/MSB365\/Teams_PresenceReport\" style=\"max-width: 150px; max-height: 150px\" \/><\/div><\/div><div class=\"vlp-layout-zone-main\"><div class=\"vlp-block-0 vlp-link-title\">GitHub - MSB365\/Teams_PresenceReport<\/div><div class=\"vlp-block-1 vlp-link-summary\">Contribute to MSB365\/Teams_PresenceReport development by creating an account on GitHub.<\/div><\/div><\/div>\n<p>\u00a0<\/p>\n<h3>More about the Script<\/h3>\n<p>The script can be executed directly \u201cout of the box\u201d without any adjustments.<\/p>\n<p>When the script is executed, it first checks whether the PowerShell module \u201c<strong>Microsoft.Graph<\/strong>\u201d is installed.<br \/>\nIf this is not the case, the corresponding module is installed.<\/p>\n<p>At this point it is recommended to start the script in administrator mode.<\/p>\n<p>The following modules are then loaded:<\/p>\n<ul>\n<li>Microsoft.Graph.Authentication<\/li>\n<li>Microsoft.Graph.Users<\/li>\n<li>Microsoft.Graph.Presence<\/li>\n<\/ul>\n<p>\u00a0<\/p>\n<p>During the execution of the script, the login to the Microsoft 365 tenant also takes place. The following authorizations are requested for MS Graph:<\/p>\n<ul>\n<li>User.Read.All<\/li>\n<li>Presence.Read.All<\/li>\n<\/ul>\n<p>\u00a0<\/p>\n<p>Now the script is executed and shortly before completion, a Windows Explorer window opens, which is used to select the location where the HTML report should be saved.<\/p>\n<p>Finally, the script logs off from the tenant and the report is available to you.<\/p>\n<p>\u00a0<\/p>\n<h3>Example output report<\/h3>\n<p>To give you an idea of what such a report might look like, I have provided an excerpt of an example here:<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-large wp-image-5821\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/02\/Microsoft-Teams-Presence-Report-Example-1024x354.png\" alt=\"\" width=\"1024\" height=\"354\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/02\/Microsoft-Teams-Presence-Report-Example-1024x354.png 1024w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/02\/Microsoft-Teams-Presence-Report-Example-300x104.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/02\/Microsoft-Teams-Presence-Report-Example-768x265.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/02\/Microsoft-Teams-Presence-Report-Example.png 1225w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>A block is displayed in the report for each user account, as shown in the picture as an example.<br \/>\nThe full name, the e-mail address and the current status are shown first.<br \/>\nThis is followed by the status of the entire working week in 24 hours, including a summary.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I\u2019m excited to share a new PowerShell script I\u2019ve developed that dives into Microsoft Teams presence data and generates a graphical report. This script allows you to analyze user presence within your tenant over the past week, offering valuable insights into how your teams are engaging and collaborating. Understanding user presence in Microsoft Teams can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5819,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[1923,15,3],"tags":[],"class_list":["post-5816","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-365","category-ms-teams","category-powershell"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/5816","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5816"}],"version-history":[{"count":5,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/5816\/revisions"}],"predecessor-version":[{"id":5823,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/5816\/revisions\/5823"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/media\/5819"}],"wp:attachment":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5816"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5816"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}