ugurkocde / IntuneAssignmentChecker

https://intuneassignmentchecker.ugurkoc.de/
MIT License
107 stars 13 forks source link

Possible hardcoded value returning a 404 Not Found resource error #21

Closed BatisteDONDOGLIO closed 2 months ago

BatisteDONDOGLIO commented 2 months ago

Hi,

I believe there is forgotten userID hardcoded here: https://github.com/ugurkocde/IntuneAssignmentChecker/blob/ca3aa95ad3783807c8f0694ea293e9cf6348070d/IntuneAssignmentChecker_v2.ps1#L269

This obviously throws a "404 Not Found" error on the resource. See: image

In the v1, this line was instead:

$groupsUri = "https://graph.microsoft.com/v1.0/users/$userid/transitiveMemberOf?`$select=id,displayName"

I tested reverting this change manually, and it worked.

I'm sorry I can't make a PR as I didn't clone the repo. I'm using the script in standalone, by downloading it manually from the repo.

ugurkocde commented 2 months ago

Hi Batiste,

Thank you! It’s fixed now.

Wishing you a great day from sunny Germany.

Best regards, Ugur