jamf / powerbi

Jamf PowerBi Integration
32 stars 11 forks source link

DataSource.Error: Computers #22

Closed adrianfeliciano closed 2 months ago

adrianfeliciano commented 3 months ago

Hi, I'm getting an error when pulling Computers ['/api/v1/computers-inventory']. All others pull just fine. Here's the exact error:

DataSource.Error: Web.Contents failed to get contents
from 'https://<>/api/v1/computers-inventory?page-size=100&page=18&section=GENERAL&section=HARDWARE&section=OPERATING_SYSTEM&section=USER_AND_LOCATION&section=PURCHASING&section=DISK_ENCRYPTION&section=SECURITY' (500): 
Details:
    DataSourceKind=JamfPro
    DataSourcePath={"jamfUrl":"https:\/\/<>","authType":"ClientCredentials"}
    Url=https://<>/api/v1/computers-inventory?page-size=100&page=18&section=GENERAL&section=HARDWARE&section=OPERATING_SYSTEM&section=USER_AND_LOCATION&section=PURCHASING&section=DISK_ENCRYPTION&section=SECURITY

FYI - I've substituted "<>" with my actual Jamf Pro URL.

I did do a manual API call using "&page=17" instead of 18 and that worked. Is it possible that the page number is being generated incorrectly in the power query?

jfretheim commented 2 months ago

Thank you for trying it out and reporting your findings! Very sorry I missed this one when you filed it, @adrianfeliciano!

Interesting error you ran into. Since Jamf Pro is returning a 500, I imagine there's something in Jamf Pro that's causing the error rather than the connector. Do you encounter the same error using Postman/curl/another tool rather than the Power BI connector?

Additionally, we've made some significant changes for client credential support and backward compatibility since this was filed, so I'm going to close this issue for now.

If you're able to retest, you could use the branch from #32 (or develop once that one merges). If you still hit a problem with page 18 (or a different page) it might be worth filing a support case to investigate the underlying Jamf Pro issue returning the 500.