Powershell script to check specifically if the url redirect is to login page instead of redirect in general

Prabha 236 Reputation points
2021-11-16T14:16:01.16+00:00

I have the below code that redirects the url (used -MaximumRedirection 0) to a normal. My concern is to check specifically if the url redirect is to login page instead of redirect in general. Is that possible?

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,354 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Rich Matheisen 44,621 Reputation points
    2021-11-16T19:36:09.967+00:00

    Wouldn't a "Redirect" response code fall in the 3xx range?


  2. Limitless Technology 39,336 Reputation points
    2021-12-16T18:17:44.947+00:00

    I think it's important for you to refer to the article below on "Redirect URI (Response URL) Restrictions and Limitations" which will help you to better understand what is possible and what is not in the scenario you are facing:

    https://learn.microsoft.com/en-us/azure/active-directory/develop/reply-url

    ----

    --If the answer is helpful, please vote positively and accept the answer--

    0 comments No comments