Skip to content

Unable to create New-SensorParameters -RawType paessler.microsoft365.mailbox_sensor #420

@MikeSouthwell

Description

@MikeSouthwell

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestions raised by people who don't know how to program or read the wiki :P

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions