<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D51Y00009vwdOZSAYOkta Identity EngineWorkflowsAnswered2026-11-08T09:00:47.000Z2020-11-16T16:39:17.000Z2020-12-02T12:52:49.000Z

ct3ei (ct3ei) asked a question.

MS Teams webhooks and HMAC in workflows.

Hello,

 

I am looking to use teams webhooks to send an API call into workflows and want to user HMAC to secure the message.

 

I have setup the flow to accept an API call and copied the shared secret.

 

When I pass the API call body to OKTA using the HMAC card to generate the output it does not match the code in the header.

 

See

 

https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-outgoing-webhook

 

I have run the following in Powershell

 

$message = ' '

$secret = ' '

$hmacsha = New-Object System.Security.Cryptography.HMACSHA256

$hmacsha.key = [Text.Encoding]::ASCII.GetBytes($secret)

$signature = $hmacsha.ComputeHash([Text.Encoding]::ASCII.GetBytes($message))

*$signature = [System.BitConverter]::ToString($signature).Replace('-','').ToLower()

$signature = [Convert]::ToBase64String($signature)

echo $signature

* Do we get the expected signature?

echo ($signature -eq ' ')

 

and get the same value so the card is doing the same steps as this.

 

Any help would be great.

 


  • Hello @ct3ei (ct3ei)​ ,

     

    Unfortunately, this is not possible at this time.

     

    Per step 2 of the Microsoft documentation you provided, "You will need to convert the body to a byte array in UTF8."

     

    We do not support byte array(s) at this time, so this is not technically possible using the functions within Okta Workflows. I encourage you to submit an idea to ideas.okta.com so that our product managers can track demand for this functionality.

     

    However, you should still be able to use the API Endpoint event cards to setup a flow using outgoing webhooks from Teams. In my testing, I can successfully accept and respond to Teams payloads without setting up the HMAC handshake.

     

    I know you have a support ticket open, I just wanted to share this information publicly as well.

    Expand Post
    Selected as Best
  • up0ey (up0ey)

    Hello,

     

    I had a ticket open and they could not tell me what the card did and they could not tell me.

     

    I have opened a new one number 01001587.

     

    Thanks

    Expand Post
  • Hello @ct3ei (ct3ei)​ ,

     

    Unfortunately, this is not possible at this time.

     

    Per step 2 of the Microsoft documentation you provided, "You will need to convert the body to a byte array in UTF8."

     

    We do not support byte array(s) at this time, so this is not technically possible using the functions within Okta Workflows. I encourage you to submit an idea to ideas.okta.com so that our product managers can track demand for this functionality.

     

    However, you should still be able to use the API Endpoint event cards to setup a flow using outgoing webhooks from Teams. In my testing, I can successfully accept and respond to Teams payloads without setting up the HMAC handshake.

     

    I know you have a support ticket open, I just wanted to share this information publicly as well.

    Expand Post
    Selected as Best
  • up0ey (up0ey)

    Hi,

     

    I have done a small trail with the HMAC card and Powershell, if you look at the attached pictures I have run the message of 'Message with a key of 'secret' through both and get the same results that tells me that the card is following the Powershell steps which includes.

     

    $hmacsha.key = [Text.Encoding]::ASCII.GetBytes($secret)

    $signature = $hmacsha.ComputeHash([Text.Encoding]::ASCII.GetBytes($message))

     

    Which looks to me to be converting the body text to a byte arrey

     

    Image is not available
    Image is not available
     

    Expand Post
This question is closed.
Loading
MS Teams webhooks and HMAC in workflows.
Okta Support Agent (Beta)

Terms of Service

Hello! I'm the Okta Support Agent (Beta), your go-to resource for questions about Okta products. Please remember for your security and privacy, do not share any Personally Identifiable Information (PII) such as passwords, IP addresses, or other details with me.

Okta Privacy Policy and Terms of Service apply