[BUG] ClientContext.IsAppOnly() might fail when authenticated with ClientCredentials #4486
Closed
1 of 6 tasks
Labels
bug
Something isn't working
Reporting an Issue or Missing Feature
There's an issue when you add ClientContext.IsAppOnly() and are using ClientCredentials. It seems to randomly throw an uncaught 403 and crash.
Expected behavior
When calling .IsAppOnly() it should return true or false, not throw (at least not if it is able to fetch the Access Token!)
Actual behavior
When debugging it, I noticed it doesn't happen on first execution of the handler for extracting the AccessToken, but rather on one of the subsequent ones. It's not even actually executing a real query (it's a dummy) but that still fails somehow.
Steps to reproduce behavior
What is the version of the Cmdlet module you are running?
Latest dev (f3b8aef)
Which operating system/environment are you running PnP PowerShell on?
Next steps
I'll have a fix proposed in a minute.
The text was updated successfully, but these errors were encountered: