Avatar of K B
K B
Flag for United States of America asked on

ADFS: How would one include over 600 IP addresses in a claim rule?

Is there an effective method for doing this with "http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-forwarded-client-ip"?

What would the best syntax be?  I would like to wrap PowerShell around it so it will be repeatable should the list change by 20 or 30 IP addresses for example.

I have seen this syntax but am unsure which is "best"

c2:[Type == "http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-forwarded-client-ip",
Value =~ "^(bxxx.xxx.xxx.xxx|xxx.xxx.xxx.xxxb)"]

Open in new window


Thank you.
Powershell* Active Directory Federation Services (ADFS)Active DirectoryMicrosoft 365

Avatar of undefined
Last Comment
K B

8/22/2022 - Mon
David Johnson, CD

use regex rules in your adfs setings

Please see if this article applies https://blogs.technet.microsoft.com/askds/2012/06/26/an-adfs-claims-rules-adventure/
K B

ASKER
I guess what I am asking is do you shove all 600 IP addresses in one claim rule?

Also is this something you have done before.
ASKER CERTIFIED SOLUTION
David Johnson, CD

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
K B

ASKER
these are 600 ips that are not contiguous .. also they may come and go as the locations close and open
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
K B

ASKER
Would still like to hear if anyone has done this from a DB or a list that changes regularly.