I'm having some trouble with the MS Graph API when trying to fetch device information from my tenant. I refactored my code to avoid the SDK for just-in-time API requests, and now it's all multithreaded, which I'm hoping will save time. However, when I try to run the command `get-mgbetaDevice -filter $('DisplayName eq 'someComputerOnMyTenant'')`, I get this error: 'Get-MgBetaDevice_List: Expected literal (number, boolean, or null). Was '<'.' After some debugging, it shows that I'm getting a 'Forbidden' status code with an 'AuthenticationFailed' message, stating the server failed to authenticate the request. I'm authenticated, but this only happens during iteration. Is this a new throttling method they've implemented? Why isn't it giving more helpful error messages?
2 Answers
Have you checked if you're on the 2.6 version of the module? Some users have had issues with that. You might want to switch to version 2.5 for now since there were updates with .NET that haven't been playing nice. Give that a shot—if it works, great! If not, welcome to the MS Graph journey, haha!
{
Yeah, I went back to an earlier version after trying 2.6. I’ll try 2.5—thanks for the tip! It's frustrating to deal with this, especially on a Monday!