This is just a quick one: in the aftermath of last weekend’s thing at work, they’re now blocking all outbound web traffic from my development VM. Which is kind of a problem when you’re trying to test out some web services on some restored servers, and you need to authenticate with MSAL. While trying to figure out exactly which addresses I needed to have whitelisted, I stumbled across an article on logging errors in MSAL.NET. This is a good example of something I needed, but didn’t know I needed until I stumbled across it, while looking for something else!
For now, I’ve just implemented this in my test program with the simple logging code included in the code sample, but, when things settle down, I might try to add MSAL logging into one or more of my programs as an option that I can turn on or off in the config, and log through Serilog (my current favorite logging library).