Microsoft Tech Community Live:  Microsoft Teams Edition
November 09, 2021, 08:00 AM - 12:00 PM (PST)

CORS PREFLIGHT WHEN USE WEBHOOK FOR MICROSOFT TEAMS

%3CLINGO-SUB%20id%3D%22lingo-sub-2841296%22%20slang%3D%22en-US%22%3ECORS%20PREFLIGHT%20WHEN%20USE%20WEBHOOK%20FOR%20MICROSOFT%20TEAMS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2841296%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3Ei've%20created%20an%20angular%20app%20that%20send%20some%20Adaptive%20cards%20to%20a%20TEAMS%20channel%20created%20with%20connector%20plugin%20but%20when%20i%20try%20to%20post%20a%20a%20json%20i%20got%20following%20CORS%20ERROR.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screen%20Shot%202021-10-13%20at%2012.09.47.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F317004i45B7DE9B18F14FD4%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screen%20Shot%202021-10-13%20at%2012.09.47.png%22%20alt%3D%22Screen%20Shot%202021-10-13%20at%2012.09.47.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screen%20Shot%202021-10-13%20at%2012.12.54.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F317006i5B22645AFCC1F6A0%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screen%20Shot%202021-10-13%20at%2012.12.54.png%22%20alt%3D%22Screen%20Shot%202021-10-13%20at%2012.12.54.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20fix%20it%3F%20In%20documentation%20there%20is%20only%20an%20example%20using%20cUrl%20and%20Powershell%20but%20not%20using%20a%20frontend%20app%20.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2841296%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Eangular%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EConnectors%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ECors%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWebhooks%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

Hi,

i've created an angular app that send some Adaptive cards to a TEAMS channel created with connector plugin but when i try to post a a json i got following CORS ERROR. 

 

Screen Shot 2021-10-13 at 12.09.47.png

Screen Shot 2021-10-13 at 12.12.54.png

 

Is there a way to fix it? In documentation there is only an example using cUrl and Powershell but not using a frontend app .

1 Reply
Have you tried to send Adaptive card as message via Graph Explorer or PostMan with Incoming Webhook?
If yes, is it working?