BookmarkSubscribeRSS Feed
learn_SAS_23
Pyrite | Level 9
filename resp temp;
options noquotelenmax;
proc http
/* Substitute your webhook URL here */
url="https :webhook uRL"
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;

Hello Team , 

 

Am trying to send messages in teams channel with above code

and getting below error ,

 

ERROR: Error connecting to 111.11.111:113. (The connection has timed out.)
ERROR: Unable to establish connection to microsoft365.webhook.office.com.
ERROR: Unable to connect to Web server.

 

with  reference documentation as below link created a webhook and used in the above code from sas EG 

https://blogs.sas.com/content/sasdummy/2019/09/05/sas-microsoft-teams/   , 

 

please post your taught on above error.

 

4 REPLIES 4
andreas_lds
Jade | Level 19

Talk to your network admins, maybe outbound connection are blocked, due to log4shell.

ChrisHemedinger
Community Manager

Use this method to test that PROC HTTP can access the internet from your SAS environment.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
learn_SAS_23
Pyrite | Level 9
Thanks Chris , I tried with all methods in the link , but i still get below error


filename resp "%sysfunc(getoption(WORK))/echo.json";
proc http
url="https://httpbin.org/stream/1"
method="GET"
out=resp;
run;

ERROR: Host name resolution failed
SASKiwi
PROC Star

That suggests to me that your SAS server has firewall rules blocking access to public internet sites like httpbin.org. I tried it from my home PC and I can get to that website. You will need to talk to your SAS administrator about what rules are in place and how to gain access.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1295 views
  • 4 likes
  • 4 in conversation