-
-
Notifications
You must be signed in to change notification settings - Fork 43
Description
What's going on?
Hi Lordmilko,
Can you please assist me in creating this sensor type.
I want to do this using raw properties, rather than just cloning an existing sensor created in the UI.
Currently I am trying this command:
$params = $currentDevice | New-SensorParameters -RawType paessler.microsoft365.mailbox_sensor
$newSensor = $params | Add-Sensor
But I'm getting this error:
New-SensorParameters : Failed to process request for sensor type 'paessler.microsoft365.mailbox_sensor': sensor query target parameters are required, however none were specified. Please retry the request specifying the parameters
'paessler-microsoft365-mailbox_premeta_section-mailbox_premeta_group-shared_user_'.
What parameters does it need?
I have also tried doing this a a raw sensor using the following:
$params = @{
"paessler-microsoft365-mailbox_premeta_section-mailbox_premeta_group-shared_user_" = "test@domain.com"
}
$newSensor = $currentDevice | New-SensorParameters -RawType paessler.microsoft365.mailbox_sensor -QueryParameters $params
$createdSensor = $newSensor | Add-Sensor
But I'm getting this error:
New-SensorParameters : An exception occurred while trying to resolve sensor targets: The authorization expired. You can renew the authorization in the sensor settings. Specified sensor type may not be valid on this device, or sensor query
target parameters may be incorrect. Check the Device 'Host' is still valid or try adding sensor with the PRTG UI.
However, we didn't setup our existing sensors in the UI with a shared user mailbox, we used "Credentials for Microsoft 365" on the parent group for the device we are creating the sensor on. We specified the tenant ID, client ID and client secret and that is inherited by the device.
Due Dilligance
- It wasn't covered by the wiki, I swear!
- I have tried doing some basic research on this issue but haven't been able to come up with anything. Please help!