Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
I'd like to note that this answer also helped with a Google Apps Script project. The base url had to be the tenant URL there, just as in PowerShell. Apps Script has a UrlFetchApp.fetch() method which does have a 'followRedirects' option, but it's alr...