Hi. I realise this sensor has just been realised and is still in beta, however was wondering if anyway else was having problems getting it working?

I have followed all the instructions in the following articles, and checked twice. I am happy I setup all the correct tenant, subscription and client ID's and also the correct client secret;

https://www.paessler.com/manuals/prtg/microsoft_azure_subscription_cost_sensor https://helpdesk.paessler.com/en/support/solutions/articles/76000041602-how-do-i-obtain-credentials-and-create-custom-roles-for-the-microsoft-azure-sensors

Have tried on both our corporate network and on a standalone install directly connected to the Internet - so don't thing this is a problem with our corporate network, firewalls etc.

The sensor returns the error "The sensor could not authenticate with Azure AD. Check your credentials in the device settings or look into the sensor log for more details."

Here is a dump of sensor log;

2020-12-22 11:45:39.362268 DEBG TId    5856 Result of Sensor 14236> Response Message is: #:error.authentication_failed
2020-12-22 11:45:39.362268 DEBG TId    5856 Result of Sensor 14236> #################### Exit sensor scan  ####################
2020-12-22 11:45:41.159167 DEBG TId   13600 Result of Sensor 14236> #################### Enter sensor scan ####################
2020-12-22 11:45:41.502925 DEBG TId   13600 Result of Sensor 14236> Authentication failed: ChilkatLog:

  ObtainAccessToken:

    DllDate: Jul 24 2019

    ChilkatVersion: 9.5.0.79

    ogging: 0

    sendReqFormUrlEncoded:

      sendReqHeader:

        omitContentType: 0

        sendReqHeader2:

          checkEstablishConnection:

            The connection already exists, as far as we know..

          --checkEstablishConnection

        --sendReqHeader2

      --sendReqHeader

    --sendReqFormUrlEncoded

    responseStatusCode: 401

    responseCode: 401

    non-success response status code.

    Failed.

  --ObtainAccessToken

--ChilkatLog


2020-12-22 11:45:41.502925 DEBG TId   13600 Result of Sensor 14236> Response Message is: #:error.authentication_failed
2020-12-22 11:45:41.502925 DEBG TId   13600 Result of Sensor 14236> #################### Exit sensor scan  ####################

Many thanks.


Article Comments

Hi,

please make sure that you also set the correct permissions for the Office 365 Management APIs, as described here.


Kind regards,
Matthias Kupfer - Team Tech Support


Dec, 2020 - Permalink

Thanks Matthias. I have had a look at that article, which seems to related to Office 365 rather than Azure - is that right? Regardless I followed the article and the only difference which I found was the O365 Management API was missing so I added that. This did not resolve the issue. I notice that the article is marked as out of date so followed the link to the updated article (https://helpdesk.paessler.com/en/support/solutions/articles/76000063073-how-do-i-obtain-credentials-and-set-permissions-for-the-microsoft-365-sensors) - everything is setup as per that guide. I did notice in the forum at the bottom of that article someone has mentioned setting the URI. This is something that I wasn't clear about and wasn't clear in the PRTG instructions - I am not sure what to set this to? Initially I had this set to the URL of my PRTG install, but changed it as suggested in the forum post to hhtps:login.windows.net however this hasn't resolved the issue either. Not sure if the URI is the root of my issue, but would be good to get some clarity on this also. Thanks.


Dec, 2020 - Permalink

Hi,

yes, that's definitely the right guide.

What does the logfile of the sensor look like? Did the error change?


Kind regards,
Matthias Kupfer - Team Tech Support


Dec, 2020 - Permalink

The log file has not changed and reports the same error as in the original post, authorisation failure. I am still not sure exactly what I need to enter for the Redirect URI ?


Feb, 2021 - Permalink

Did you manage to get this working? Was there something that was missed?


Oct, 2021 - Permalink