Conditional Access with Powershell

%3CLINGO-SUB%20id%3D%22lingo-sub-204749%22%20slang%3D%22en-US%22%3EConditional%20Access%20with%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-204749%22%20slang%3D%22en-US%22%3E%3CP%3EBased%20on%20article%3A%26nbsp%3BLocation%20conditions%20in%20Azure%20Active%20Directory%20conditional%20access%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Factive-directory%2Factive-directory-conditional-access-locations%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Factive-directory%2Factive-directory-conditional-access-locations%3C%2FA%3E%3C%2FP%3E%3CP%3E%22%3CSTRONG%3EAPI%20support%20and%20PowerShell%3C%2FSTRONG%3E%3CBR%20%2F%3EAPI%20and%20PowerShell%20is%20not%20yet%20supported%20for%20named%20locations%2C%20or%20for%20conditional%20access%20policies.%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20anyone%20know%20if%20and%20when%20Microsoft%20will%20provide%20this%20capability%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20customer%20would%20like%20to%20bulk%20import%20hundreds%20of%20IP%20address%20into%20a%20Named%20location%20under%20different%20Names.%20Current%20bulk%20upload%20functional%20can%20be%20done%20manually%20for%20one%20Name%20only.%3C%2FP%3E%3CP%3ESo%20we%20would%20create%20a%20Name%20then%20upload.%20Create%20another%20name%20then%20upload%2C%20etc.%3C%2FP%3E%3CP%3EThis%20can%20be%20very%20time%20consuming%20if%20there%20are%20numerous%20Named%20locations%20and%20IP%20Addresses.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENeed%20to%20create%20many%20Names%20and%20within%20each%20name%2C%20bulk%20upload%20numerous%20IP%20ranges.%3C%2FP%3E%3CP%3ETrying%20to%20script%20out%3A%3C%2FP%3E%3CP%3ECreate%20Name1%20location%2C%26nbsp%3BUpload%20bulk%20IP%20addresses%3C%2FP%3E%3CP%3ECreate%20Name%202%20location%2C%20Upload%20bulk%20IP%20addresses%3C%2FP%3E%3CP%3E%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20assistance%20is%20greatly%20appreciated.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-204749%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EConditional%20Access%20with%20Powershell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-226023%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Access%20with%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-226023%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20has%20been%20upvoted%20trough%20uservoice%20and%20is%20on%20the%20to%20do%20list%20for%20Microsoft%2C%20but%20no%20time%20frame%20has%20been%20given%20as%20far%20as%20I%20have%20seen%20online%20yet.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ffeedback.azure.com%2Fforums%2F169401-azure-active-directory%2Fcategory%2F167259-conditional-access%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Ffeedback.azure.com%2Fforums%2F169401-azure-active-directory%2Fcategory%2F167259-conditional-access%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-994667%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Access%20with%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-994667%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F154997%22%20target%3D%22_blank%22%3E%40Oscar%20Goco%3C%2FA%3E%26nbsp%3B-%20Microsoft%20recently%20added%20support%20for%20Conditional%20Access%20management%20in%20Microsoft%20Graph.%20I've%20written%20a%20blog%20post%20containing%20a%20proof%20of%20concept%2Fsample%20script%20on%20how%20to%20automate%20Conditional%20Access%20policy%20deployment%20with%20PowerShell%20and%20Microsoft%20Graph.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdanielchronlund.com%2F2019%2F11%2F07%2Fautomatic-deployment-of-conditional-access-with-powershell-and-microsoft-graph%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdanielchronlund.com%2F2019%2F11%2F07%2Fautomatic-deployment-of-conditional-access-with-powershell-and-microsoft-graph%2F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Based on article: Location conditions in Azure Active Directory conditional access

https://docs.microsoft.com/en-us/azure/active-directory/active-directory-conditional-access-location...

"API support and PowerShell
API and PowerShell is not yet supported for named locations, or for conditional access policies."

 

Does anyone know if and when Microsoft will provide this capability?

 

A customer would like to bulk import hundreds of IP address into a Named location under different Names. Current bulk upload functional can be done manually for one Name only.

So we would create a Name then upload. Create another name then upload, etc.

This can be very time consuming if there are numerous Named locations and IP Addresses.

 

Need to create many Names and within each name, bulk upload numerous IP ranges.

Trying to script out:

Create Name1 location, Upload bulk IP addresses

Create Name 2 location, Upload bulk IP addresses

:

 

Any assistance is greatly appreciated.

 

Thanks.

2 Replies
Highlighted

This has been upvoted trough uservoice and is on the to do list for Microsoft, but no time frame has been given as far as I have seen online yet.

 

https://feedback.azure.com/forums/169401-azure-active-directory/category/167259-conditional-access

 

Highlighted

@Oscar Goco - Microsoft recently added support for Conditional Access management in Microsoft Graph. I've written a blog post containing a proof of concept/sample script on how to automate Conditional Access policy deployment with PowerShell and Microsoft Graph.

https://danielchronlund.com/2019/11/07/automatic-deployment-of-conditional-access-with-powershell-an...