Ad Widget

Collapse

MS365 template issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • StakFallT
    Junior Member
    • Apr 2025
    • 10

    #1

    MS365 template issue

    I followed the integration guide, at https://www.zabbix.com/integrations/ms365, as best as I could. Unfortunately, the document didn't give any examples of how to have it display the info in the dashboard so I took how someone did it from another post. Essentially, I created a host, set the template to Microsoft 365 reports by HTTP, and used "Applications" as the host group (since I hadn't created a Host group specifically for RESTful service statuses prior to starting work on integrating MS365 service health reporting into my dashboard). Here's a screenshot of host's properties

    <See attached Image 1>


    I then went to my dashboard, edited it, and added a host card for the newly created host that I made. I also created the appropriate Enterprise Application Registration entry in Azure, documenting the client secret, and App ID (since I knew I would be needing that). I also added the appropriate permissions as mentioned in the template guide documentation I listed earlier. I did remove user.read (I think it was user.read, might've been user.Read.All?); I figured it was not listed in the guide and principle of least permissions (best practices indicate that only the permissions needed should be added to an account-like object -- in this case, the Enterprise Application I created / registered). So maybe this is where things went awry, I don't know. From the Zabbix web interface, I also went to Administration and added the Macros denoted from the template guide and supplied the values.

    The problem, is when I go to the Dashboard, located here:

    <See attached Image 2>


    I get this symptom (of whatever the cause of the issue is):

    <See attached Image 3>


    There's six problems that keep coming up that I think is I'm getting 6 problems that keep coming up. They may not be connected, but I'm inclined to believe they are. The problem listed by Zabbix is "Microsoft 365: Apps: There are errors in requests to API". If I go back to my dashboard, and click on the "MS365 Service Health link in the MS365 Services titled Host card widget located here:

    <See attached Image 4>

    and then the Discovery option. I come to the Discovery rules screen that that host is using.


    if I click the icon (white "i" on a red'ish background) under the Info column

    <See attached Image 5>

    I finally get more details on the error which says:

    "Preprocessing failed for: {"error":"Required param is not set: app_id."}
    1, Failed: cannot extract value from json by path "$.services.value": no data matches the specified path
    "

    Looking further at the template guide, towards the bottom, under the section: LLD rule Microsoft cloud service discovery

    It references the JSON path $.services.value. As a result, I'm guessing the error is tied somewhere to that part of the template. However, I don't know if it's something I mis-configured, didn't configured, or there's some bug in the template. Any help would greatly be appreciated!

    Attached Files
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    It says "Required parameter not set: app_id" ... DId you fill all the macros with required values ? https://git.zabbix.com/projects/ZBX/...ease%2F7.2#594
    Click image for larger version  Name:	image.png Views:	0 Size:	70.6 KB ID:	501615
    Last edited by cyber; 09-04-2025, 07:53.

    Comment

    • StakFallT
      Junior Member
      • Apr 2025
      • 10

      #3
      Yep. I did eventually solve it (sorry for not coming back and updating!). I did some digging and, I forget exactly where, I think it might've been the php script file for the template, but somewhere I saw that app_id maps to {$M365.APP.ID} so that's why it was looking for app_id. I couldn't understand why it was looking for a variable (macro) called app_id when the guide mentioned nothing of the sort. Well that's why It's because it's mapped to app_id deeper down in the template. What seemed to solve it for me was a couple of things. For one, I had put the Secret ID in for the password (given the description in the guide says "The secret" not "The password"), so I changed it to the Value (if memory serves correct, it's what Microsoft refers to the "password" in the Azure App Registration screen). I then came across something, I thought it was in the Zabbix forums somewhere that mentioned this, that it doesn't the macro doesn't seem to expand. So while, I didn't want to do it because it's less clean, I went to Macros under Administration and placed the values in there. Once I did both of these things, it seemed to correct the issue.

      Comment

      • RudiKemp
        Junior Member
        • Oct 2025
        • 1

        #4
        I tried everything twice, but still get a error: "Microsoft 365: Services: There are errors in requests to API"
        I tried to understand the explanation/Macro problem from StakFallT but is do not exectly understand how to solve it.
        Can somebody get me on the right track ?

        Comment

        Working...