0 votes

I'm trying to setup a quick automations to drop a notification into a Micrsoft Teams feed using their Webhook integration. I've managed to make Webhooks work before using Pushcut for iOS but this one doesn't work.

This script runs 'Succsessfully' and simply copying this script into PS and runnning it works fine, posting the message to the Micrsoft Teams chat, am I missing something to make this work via Adaxes?

$uri = "https://outlook.office.com/webhook/%%%%%%%"


$body = ConvertTo-Json -Depth 4 @{
    title = '%param-notificationtype%: %fullname%'
    text = "Adaxes has completed %param-notificationtype% actions"
    sections = @(
        @{
            activityTitle = '%fullname%'
            activitySubtitle = '%department%'
            activityText = '%company%'
            activityImage = '%thumbnailPhoto%'
        },
        @{
            title = 'Details'
            facts = @(
                @{
                name = 'Email'
                value = '[%mail%](mailto:%mail%)'
                },
                @{
                name = 'Incident Number'
                value = '[%adm-CustomAttributeText18%](#URL)'
                }
            )
        }
    )
    potentialAction = @(@{
            '@context' = 'http://schema.org'
            '@type' = 'ViewAction'
            name = 'Click here to complete %param-notificationtype%'
            target = @('#URL')
        })
}


Invoke-RestMethod -uri $uri -Method Post -body $body -ContentType 'application/json'

Any assistance with this would be gratefully received

by (1.3k points)
+1

Hello Richard,

For troubleshooting purposes, could you, please, clarify what control (e.g. checkbox) is used to specify the param-notificationtype parameter value and what values can be specified there? If it is a drop-down, post here or send us (support[at]softerra.com) a screenshot of the parameter configuration. We need something like the following: image.png

Also, please, confirm that you check the notification in the same channel that is specified for the $uri variable.

0

The script now works for some reason.

The param-notificationtype is a dropdown list with a few text options

0

Hello Richard,

Thank you for the confirmation, it is much appreciated! Should the issue reoccur, provide us with all the possible details. Screenshots would be much appreciated.

Please log in or register to answer this question.

Related questions

0 votes
1 answer

Hi, I would need to set a random plaintext in the header of the login page of one of the contexts (via custom HTML). This plaintext must be aligned with a ... . This would serve as a pseudo verification code for entering in the console. Thanks, Daniele

asked 6 days ago by dmaggiolo (250 points)
0 votes
1 answer

I'd like to be able to either send an email report or export a CSV of all of the business rules carried out when a user is disabled. This would be ... Management Activity section but this includes things that weren't part of the disable operation. Thanks

asked Feb 19 by bavery (250 points)
0 votes
1 answer

As part of our (legacy) deprovisioning script (run by hand / not part of Adaxes), the user's home folder is moved to a folder tree of the format: !disabled\< ... have to resort to a PS script for that rather than allowing Adaxes to handle it internally.

asked Oct 6, 2014 by bradenmcg (1.6k points)
0 votes
0 answers

Hello! I've run into this problem before with the windows task scheduler. It looks like there's no way in the interface to target a specific day in the month aside from ... of the month and output $True so I can use it to trigger an email notification?

asked Nov 10, 2015 by drew.tittle (4.5k points)
0 votes
1 answer

Hello, Is it possible to grant members of a business unit permission to run a custom command? I know I'm able to give permission to a user/group to run a cmd on a business ... that can run the command. I've not been successful with any of my attempts to do so.

asked Mar 23, 2017 by JoCCCsa (510 points)
2,186 questions
1,949 answers
5,393 comments
5,344 users