Skip to content Posts

Update a conditional access named location with the new external (public) IP address

With all the working from home, I would like to access my Microsoft 365 tenant from my home office, without Multi-factor authentication (MFA). So I added my external IP to my Conditional access named locations and marked it as trusted. That worked just fine since the beginning of the SARS-CoV-2 (a/k/a Covid-19) crisis. But now my DSL modem starts to disconnect from time to time. To bad, at home I have a regular DSL contract (non Business), and you can’t get a fixed IP for those! So I have to update the conditional access named location object manually whenever my modem reconnects. That manual process sucked, so I decided to write a quick and dirty scripted approach that will to the Job for me!