blogs.sas.com
Open in
urlscan Pro
149.173.160.44
Public Scan
URL:
https://blogs.sas.com/content/sasdummy/2019/09/05/sas-microsoft-teams/
Submission: On March 08 via api from US — Scanned from DE
Submission: On March 08 via api from US — Scanned from DE
Form analysis
3 forms found in the DOMGET https://blogs.sas.com/content/
<form role="search" method="get" action="https://blogs.sas.com/content/">
<label for="searchFieldComponent">Search</label>
<input type="text" id="searchFieldComponent" name="s" value="" placeholder="Search">
<select name="fq" multiple="" style="display: none;">
</select>
<input class="searchButton" type="submit" value="Search">
</form>
GET https://blogs.sas.com/content/
<form role="search" action="https://blogs.sas.com/content/" method="get">
<input type="text" name="s" class="query" value="" placeholder="Search...">
<button class="search-button" type="submit"><i class="fa fa-search"></i></button>
</form>
POST https://blogs.sas.com/content/sasdummy/wp-comments-post.php
<form action="https://blogs.sas.com/content/sasdummy/wp-comments-post.php" method="post" id="commentform" class="comment-form" novalidate="">
<p>
<textarea name="comment" id="comment" cols="45" rows="8" aria-required="true" placeholder="Your Comment"></textarea>
</p>
<p>
<input name="author" id="author" type="text" size="30" aria-required="true" placeholder="Your Name" value="">
</p>
<p>
<input name="email" id="email" type="text" size="30" aria-required="true" placeholder="Your Email" value="">
</p>
<p>
<input name="url" id="url" type="text" size="30" placeholder="Your Website" value="">
</p>
<p class="comment-form-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"> <label for="wp-comment-cookies-consent">Save my name, email, and website in this browser for the next time
I comment.</label></p>
<p class="form-submit"><input name="submit" type="submit" id="comment-submit" class="submit" value="Post Comment"> <input type="hidden" name="comment_post_ID" value="6919" id="comment_post_ID">
<input type="hidden" name="comment_parent" id="comment_parent" value="0">
</p>
<p style="display: none;"><input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="add3906c32"></p><textarea name="ak_hp_textarea" cols="45" rows="8" maxlength="100" style="display: none !important;"></textarea><input
type="hidden" id="ak_js" name="ak_js" value="1646764452813">
</form>
Text Content
Skip to main content BLOGS * Solutions * By Industry * Agriculture * Banking * Education * Health Care * Insurance * Life Sciences * Manufacturing * Public Sector * Retail & Consumer Goods * Small & Midsize Business * Telecom, Media & Technology * Utilities * All Industries * By Technology & Topic * Advanced Analytics * AI & Machine Learning * Cloud * Data Management * Decisioning * Fraud & Security Intelligence * Internet of Things (IoT) * Marketing * Microsoft Azure * Open Integration * Operationalizing Analytics * Risk Management * All Technologies & Topics * By Product * SAS Viya * SAS Customer Intelligence 360 * SAS Detection & Investigation * SAS Model Manager * SAS Visual Analytics * SAS Visual Data Mining & Machine Learning * SAS Visual Forecasting * All Products * Free Software Trials * By Role * Developers * Job Seekers * Marketers * Novice Users * Partners * Small & Midsize Business * Students & Professors * Thought Leaders * Try / Buy * Free Software Trials * SAS Visual Data Science Decisioning * Predict & Plan Consumer Demand * All Trials * Buy * Request a Demo * Request Software Pricing * Contact a SAS Sales Representative * Partner Marketplace * Why SAS * Analyst Viewpoints * Company Awards * Company Leadership * Customer Success Stories * Thought Leadership * Analytics * AI * Big Data & IoT * Data Management * Fraud & Security * Marketing * Risk Management * Innovative R&D Design * News Coverage & Highlights * Partner Ecosystem * World-Class Support Services * Learning * Training * Free Training * e-Learning * Corporate Training * SAS Academy for Data Science * All Training * My Training * Courses * Programming 1 * Programming 2 * SAS Enterprise Guide 1 * SAS Programming for R Users * SAS Viya Overview * All Courses * Learning Formats * e-Learning * Live Web * Classroom Locations * Video Tutorials * All Learning Formats * Webinars * Ask the Expert * Certification * All Webinars * Certification * Base Programmer * Advanced Programmer * Data Scientist * Statistical Business Analyst * Predictive Modeler * All Certification * Exam Preparation * Certification Manager * Books * Certification Prep Guides * Discounts * Upcoming Titles * All Books * All Learning * Documentation * By Product * Base SAS * SAS Enterprise Guide * SAS Enterprise Miner * SAS/STAT * SAS Studio * SAS Visual Analytics * All Products * Programming * SAS Viya * SAS 9.4 & SAS Viya 3.5 * SAS 9.3 & Earlier * Administration * SAS Viya * SAS 9.4 & Earlier * Installation & Configuration * Install Center * System Requirements * Third-Party Software Reference * Technical Papers * All Documentation * Support & Services * Support Home * Knowledge Base * Installation Notes * Problem Notes * Usage Notes * Search All Notes * DATA Step Samples * Graphics Samples * Search All Samples * Product Security * All Knowledge Base * Support by Product * Base SAS * SAS Customer Intelligence 360 * SAS Enterprise Guide * SAS Enterprise Miner * SASPy * SAS/STAT * SAS Studio * SAS Visual Analytics * All Products * Focus Areas * Product Security * Support Services * Technical Support * Manage Your Tracks * Maintenance * Licensing Assistance * Support Services * Support Policies * Downloads * SAS Download Manager * SAS Universal Viewer * Standard Deployment Plans * All Downloads * Hot Fixes * SAS Viya * SAS 9.4 * Hot Fix Announcements * Hot Fix Tool * All Hot Fixes * Consulting Services * All Services * SAS Starter Kit * Community * New SAS Users * SAS Programming * Administration & Deployment * Data Management * Machine Learning * Data Visualization * Statistical Procedures * Developers * All Communities * SAS Analytics Explorers * Women in Analytics Network * User Groups * Academics * Academic Programs * Educators * Students * Free Academic Software * Academic Discounts * Partners * About Our Partner Program * Find a Partner * Sign in to PartnerNet * Partner Marketplace * Events * SAS Global Forum * Webinars * All Events * About * Our Company * Overview * Vision & Mission * Our Values * What We Stand For * Company Leadership * Company Information * Media Coverage * Annual Report * Newsletters * Company Awards * Analyst Viewpoints * Speaker Bureau * Trust Center * Careers * Overview * Our Culture * Our Storytellers * Internships * Early Career Programs * Search Jobs * News Room * Blogs * Office Information * Contact Us blogs.sas.com * sas.com * support.sas.com * blogs.sas.com * communities.sas.com * developer.sas.com Search * Select your region Visit the Cary, NC, USA corporate headquarters site Americas Europe Middle East & Africa Asia Pacific View our worldwide contacts list for help finding your region Americas * Argentina * Brasil * Canada (English) * Canada (Français) * Chile * Colombia * México * Peru * United States Europe * Albania * Belgium * Bosnia & Herz. * Česká Republika * Croatia * Danmark * Deutschland * Ελλάδα * España * France * Iceland * Ireland * Italia * Luxembourg * Magyarország * Montenegro * Nederland * Norge * North Macedonia * Österreich * Polska * Portugal * România * Россия / СНГ * Schweiz (Deutsch) * Serbia * Slovenia * Slovensko * Suisse (Français) * Suomi * Sverige * Türkiye * Україна * United Kingdom Middle East & Africa * Maroc * Middle East * Saudi Arabia * South Africa Asia Pacific * Australia * 中国 (简体中文) * Hong Kong * India * Indonesia (Bahasa) * Indonesia (English) * 日本 * 대한민국 * Malaysia * New Zealand * Philippines * Singapore * 台灣 (繁體中文) * Thailand (English) * ประเทศไทย (ภาษาไทย) * Sign In Hi ! * Sign Out Sign In Create Profile My SAS Get access to My SAS, trials, communities and more. Sign Out Edit Profile My SAS Get access to My SAS, trials, communities and more. * Worldwide Sites * Contact Us * SAS Sites * Search SAS Sites sas.com Support Blogs Communities Developer Curiosity Videos Merchandise Brand PartnerNet BLOGS BLOGS Navigate * All Topics * Advanced Analytics * Analytics * Artificial Intelligence * Customer Intelligence * Data for Good * Data Management * Data Visualization * Featured * Fraud & Security Intelligence * Internet of Things * Learn SAS * Machine Learning * Programming Tips * Risk Management * SAS Administrators * SAS Events * Students & Educators * All Industries * Banking * Communications * Education * Energy & Utilities * Government * Health Care * Hospitality * Insurance * Life Sciences * Manufacturing * Retail * Sports & Entertainment * Travel * Blog Directory * Subscribe HOW TO PUBLISH TO A MICROSOFT TEAMS CHANNEL USING SAS 14 By Chris Hemedinger on The SAS Dummy September 5, 2019 Topics | Programming Tips A few years ago I shared a method to publish content from SAS to a Slack channel. Since that time, our teams at SAS have gone "all in" on collaboration with Microsoft Office 365, including Microsoft Teams. Microsoft Teams is the Office suite's answer to Slack, and it's not a coincidence that it works in nearly the same way. THE LAZY METHOD: SEND E-MAIL TO THE CHANNEL Before I cover the "deluxe" method for sending content to a Microsoft Teams channel, I want to make sure you know that there is a simple method that involves no coding, and no need for APIs. The message experience isn't as nice, but it does the job. You can simply "send e-mail" to the channel. If you're automating output from SAS, it's a simple, well-documented process to send e-mail from a SAS program. (Here's an example from me, using FILENAME EMAIL.) When you send e-mail to a Microsoft Teams channel, the message notice includes the message subject line, sender, and the first bit of the message content. To see the entire message, you must click on the "View original e-mail" link in the notice. This "downloads" the message to your device so that you can open it with a local tool (such as your e-mail reader, Microsoft Outlook). My team uses this method to receive certain alerts from our communities.sas.com platform. Here's an example: To get the unique e-mail address for a channel, right-click on the channel name and select Get email address. Any message that you send to that e-mail address will be distributed to the team. GETTING STARTED WITH A MICROSOFT TEAMS WEBHOOK In order to provide a richer, more integrated experience with Microsoft Teams, you can publish content using a webhook. A webhook is a REST API endpoint that allows you to post messages and notifications with more control over the appearance and interactive options within the messages. In SAS, you can publish to a webhook by using PROC HTTP. To get started, you need to add and configure a webhook for your Microsoft Teams channel: 1. Right-click on the channel name and select Connectors. 2. Microsoft Teams offers built-in connectors for many different applications. To find the connector for Incoming Webhook, use the search field to narrow the list. Then click Add to add the connector to the channel. 3. You must grant certain permissions to the connector to interact with your channel. In this case, you need to allow the webhook to send messages and notifications. Review the permissions and click Install. 4. On the Configuration page, assign a name to this connector and optionally customize the image. The image will be the avatar that's used when the connector posts content to the channel. When you've completed these changes, select Create. 5. The connector generates a unique (and very long) URL that serves as the REST API endpoint. You can copy the URL from this field -- you will need it later in your SAS program. You can always come back to these configuration settings to change the connector avatar or re-copy the URL. At this point, it's a good idea to test that you can publish a basic message from SAS. The "payload" for a Teams message is a JSON-formatted structure, and you can find examples in the Microsoft Teams reference doc. Here's a SAS program that publishes the simplest message. Add your webhook URL and run the code to verify the connector is working for your channel. filename resp temp; options noquotelenmax; proc http /* Substitute your webhook URL here */ url="https://outlook.office.com/webhook/your-unique-webhook-address-it-is-very-long" method="POST" in= '{ "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.0", "summary": "Test message from SAS", "text": "This message was sent by **SAS**!" }' out=resp; run; If successful, this step will post a simple message to your Teams channel: DESIGN A MESSAGE CARD FOR MICROSOFT TEAMS Now that we have the basic plumbing working, it's time to add some bells and whistles. Microsoft Teams calls these notifications "message cards", which are messages that can include interactive features such as images, data, action buttons, and more. DESIGNING A SIMPLE MESSAGE Microsoft Teams supports a large palette of building blocks (expressed in JSON) to create different card experiences. You can experiment with these cards in the MessageCard Playground that Microsoft hosts. The tool provides templates for several card varieties, and you can edit the JSON definitions to tweak and design your own. For one of my use cases, I designed a simple card to show the status of our recommendation engine on SAS Support Communities. (Read this article for more information about how we built and monitor the recommendation engine.) The engine runs as a service and is accessed with its own API. I wanted a periodic "health check" to post to our internal team that would alert us to any problems. Here's the JSON that I used in the MessageCard Playground to design it. Much of the JSON is boilerplate for the message. I drew the green blocks to indicate the areas that need to be dynamic -- that is, replaced with values from the real-time API call. Here's what the card looks like when rendered in the Microsoft Teams channel. Since my API call to the recommendation engine service creates a data set, I can run that data through PROC JSON to create the JSON segment I need: /* reading the results from my API call to the engine */ libname results json fileref=resp; /* Prep a simple name-value data set with the results */ data segment (keep=name value); set results.root; name="Score data updated (UTC)"; value= astore_creation; output; name="Topics scored"; value=left(num_topics); output; name="Number of users"; value= left(num_users); output; name="Process time"; value= process_time; output; run; /* use PROC JSON to create the segment */ filename segment temp; proc json out=segment nosastags pretty; export segment; run; I shared a version of the complete program on GitHub. It should run as is -- but you would need to supply your own webhook endpoint for a channel that you can publish to. DESIGN A MESSAGE WITH ACTIONS I also use Microsoft Teams to share updates about the SAS Software GitHub organization. In a previous article I discussed how I use GitHub APIs to gather data from the GitHub service. Each day, my program summarizes the recent activity from github.com/sassoftware and publishes a message card to the team. Here's an example of a daily update: This card is fancier than my first example. I added action buttons that can direct the team members to the internal reports for more details and to the GitHub site itself. I used the Microsoft Teams documentation and the MessageCard Playground to design the experience: MESSAGING APPS AS PART OF A DEVOPS STRATEGY Like many organizations, we (SAS) invest a considerable amount of time and energy into gathering metrics and building reports about our operations. However, reports are useful only when the intended audience is tuned in and refers to them regularly. With a small additional step, you can use SAS to bring your most interesting data forward to your team -- automatically. Whether you use Microsoft Teams or Slack, automated alerting and updates are a great opportunity to keep your teams informed. Each of these tools offers fit-for-purpose connectors that can tie in with information from other popular operational systems (Salesforce, GitHub, Yammer, JIRA, and many more). For cases where a built-in connector is not available, the webhook approach allows you to easily create your own. Tags Developers Microsoft Office 365 PROC HTTP REST API Share Twitter Facebook Pinterest LinkedIn Email XING ABOUT AUTHOR Chris Hemedinger Senior Manager, SAS Online Communities * Twitter * LinkedIn +Chris Hemedinger is the manager of SAS Online Communities. Since 1993, Chris has worked for SAS as an author, a software developer, an R&D manager and a consultant. Inexplicably, Chris is still coasting on the limited fame he earned as an author of SAS For Dummies. He also hosts the SAS Tech Talk webcasts each year from SAS Global Forum, connecting viewers with smart people from SAS R&D and the impressive work that they do. 14 COMMENTS 1. Soulas on September 9, 2019 10:24 am Thank you Chris !! For my team, it is a very helpful functionality. To go further, I would like to automatize adding user in my Teams group. Today, every SAS user added in metadata (in batch mode) receive a mail with Teams group link and Team Code. So, user can suscribe to the Team group autonomously. However, there is a manual step and I would prefer to synchronize AD user groups and Microsoft Teams. Perhaps in a next Microsoft Teams release ... Reply * Chris Hemedinger on September 13, 2019 9:02 am You can add members to a Team by using the Add Member API. But you'll need certain permissions, and you'll also need to gather underlying AD object IDs for the members you want. More about using the Office 365 APIs with SAS here. I believe you can also tie membership to an AD group, so that might be an easier way to manage. Reply 2. Pingback: Using SAS with Microsoft OneDrive and SharePoint Online - The SAS Dummy 3. bbrooke on October 25, 2019 1:27 am This is great ! I just added an automatic Teams post for one of my monthly reports, to say "it's ready". Reply 4. Martin Him on November 21, 2019 3:27 pm Hello Chris. Sometime ago did you publish a document about how to register a new Enterprise Guide version in the Capabilities plugin inside the SAS Management Console, but I can't find it. Can you help-me? Thanks Reply * Chris Hemedinger on November 21, 2019 4:13 pm Hi Martin, I think you want this SAS Note. Reply * Martin Him on November 25, 2019 1:18 pm Thank you Chris. It looks it was easier that time. If I am correct, it was just to update some xml on the desktop where the SMC was installed. Buts ok, I will run the utility in our test environment. Thanks again! Reply 5. Gaetan on February 10, 2020 12:44 pm Hi Chris, Really very helpful ! I am currently using it to share data quality issues within my SAS Team. Thanks, Gaétan Reply 6. Jack Hamilton on February 13, 2020 2:59 pm Being able to send email to Teams is potentially very useful. The webhook is not available to me (I'm trying to find out why), so email is the only choice. Embedded tables seem to work - they're not ideally formatted, but they do appear. I can embed a PDF file and it appears in the channel's message and also in the channel's files. But if I try to include an embedded graphic, nothing happens - the message just goes into the void and doesn't appear anywhere. The same email sent to my personal address appears as expected. Have you worked with graphics in Teams at all? Reply * Chris Hemedinger on February 27, 2020 4:07 pm Jack, I haven't tried with graphics yet -- but the API supports them, so I think it should be doable. Reply 7. S on May 8, 2020 10:33 am Hey Chris, any guidance on importing data sets uploaded on teams into SAS (Studio for example)? Reply * Chris Hemedinger on May 8, 2020 10:43 am Any file you upload to MS Teams will be in a SharePoint location (Teams files are just SharePoint Online underneath). This article describes how to access these files from SAS -- it's got an involved setup, but once you have it working it's reliable. Reply 8. Mauro Ruffino on February 25, 2022 12:36 pm good job, unluckly works with send mail but dont works with proc http.... and dont write resp file... Reply * Chris Hemedinger on February 25, 2022 12:43 pm Sorry it's not working for you. Feel free to post your question/code/log on SAS Support Communities and we'll see if we can help. Reply LEAVE A REPLY CANCEL REPLY Save my name, email, and website in this browser for the next time I comment. Back to Top Curiosity is our code. SAS analytics solutions transform data into intelligence, inspiring customers around the world to make bold new discoveries that drive progress. SAS gives you THE POWER TO KNOW®. Contact Us FOLLOW US * Facebook * Twitter * LinkedIn * YouTube * RSS * About SAS Discover our people, passion and forward-thinking technology * Accessibility Empower people of all abilities with accessible software * Blogs Stay connected to people, products and ideas from SAS * Careers Search for meaningful work in an award-winning culture * Certification Validate your technology skills and advance your career * Communities Find your SAS answers with help from online communities * Customer Stories Read about who’s working smarter with SAS * Documentation Browse products, system requirements and third-party usage * Industries Get industry-specific analytics solutions for every need * My SAS Get access to software orders, trials and more * Resource Center Explore our extensive library of resources to stay informed * Solutions Discover data, AI and analytics solutions for every industry * Students & Educators Find out how to get started learning or teaching SAS * Support Access documentation, tech support, tutorials and books * Training Learn top-rated analytics skills required in today’s market * Cookieeinstellungen * Privacy Statement * Terms of Use * © 2022 SAS Institute Inc. All Rights Reserved. * Contact Us * Share * Subscribe Share this Share this page with friends or colleagues.