Closed ToninoBruno closed 2 years ago
I think using the UserCredential parameter will re-authenticate the password everytime it is called which might be why you saw this error. Regardless, I would recommend moving to a confidential client with client secret or cert for scenarios where a user is not present for interactive auth. I would further recommend that for any API calls to MS Graph, you should consider using the Microsoft Graph PowerShell SDK modules.
Hi,
I use your module to acquire an access token to consult the MS Graph API which is working great, but when I run my script I bump into the following error after the 5th entry being processed:
AADSTS50196: The server terminated an operation because it encountered a client request loop
What I am doing is essentially the following in a Function:
And in my script body I just call the function for each object I want to query.
Isn't it possible to use the cached token until its about to expire?
ps: thanks for your great module!