Home

New Feature Announcement: PowerShell support of Allow/Block guest access based on Domain list

%3CLINGO-SUB%20id%3D%22lingo-sub-92423%22%20slang%3D%22en-US%22%3ENew%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-92423%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20are%20happy%20to%20announce%20the%20world%20wide%20roll-out%20of%20Allow%2FBlock%20list%20support%20for%20guest%20access%20in%20O365%20Groups.%20With%20this%20feature%2C%20IT%20Admins%20can%20set-up%20a%20list%20of%20domains%20to%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAllow%20guest%20users%20of%20specific%20domains%20to%20be%20invited%20to%20Groups.%3C%2FLI%3E%0A%3CLI%3EBlock%20guest%20users%20of%20specific%20domains%20to%20be%20invited%20to%20Groups.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20policy%20currently%20can%20be%20set-up%20through%20PowerShell%20%26amp%3B%20coming%20soon%20through%20UI.%20We%20have%20provided%20user%20friendly%20script%20below%20to%20set-up%20allow%2Fblock%20list%20for%20your%20tenant.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20policy%20works%20for%20all%20workloads%20with%20Guest%20access%20through%20O365%20Groups%20such%20as%20Outlook%2C%26nbsp%3B%20Teams%20%26amp%3B%20Planner%20in%20future.%20This%20work%20independently%20with%20SPO%20settings%20but%20we%20have%20provided%20support%20to%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EMigrate%20SPO%20allow%2Fblock%20list%20to%20O365%20Groups%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHere%20is%20the%20link%20to%20the%20detailed%20documentation%20%26amp%3B%20script%20to%20set%20this%20policy%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechnet.microsoft.com%2Flibrary%2Fa86bb46f-0e5b-43a3-b6ef-7394f344a8da%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Ftechnet.microsoft.com%2Flibrary%2Fa86bb46f-0e5b-43a3-b6ef-7394f344a8da%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFeel%20free%20to%20reach%20out%20if%20you%20any%20feedback%20and%20questions!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20will%20be%20supporting%20this%20functionality%20in%20OAC(Office%20Admin%20Portal)%20through%20user%20interface%20soon.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%2C%3C%2FP%3E%0A%3CP%3ESahil%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-92423%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EGroups%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%20Groups%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-167612%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-167612%22%20slang%3D%22en-US%22%3ESahil%2C%3CBR%20%2F%3E%3CBR%20%2F%3EDo%20you%20have%20an%20estimated%20date%20of%20when%20the%20allow%2Fblock%20list%20feature%20will%20be%20added%20to%20the%20Office%20Admin%20Portal%20user%20interface%3F%3CBR%20%2F%3E%3CBR%20%2F%3EAlso%2C%20are%20there%20any%20plans%20to%20add%20per-group%20sharing%20controls%20for%20Office%20365%20Groups%20similar%20to%20what%20is%20already%20in%20place%20for%20SharePoint%20online%3F%20(%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2FPer-group-sharing-controls-in-SharePoint-Online-26581d50-ff40-44e6-9ab3-35dc3cea2022%3Fui%3Den-US%26amp%3Brs%3Den-US%26amp%3Bad%3DUS%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2FPer-group-sharing-controls-in-SharePoint-Online-26581d50-ff40-44e6-9ab3-35dc3cea2022%3Fui%3Den-US%26amp%3Brs%3Den-US%26amp%3Bad%3DUS%3C%2FA%3E)%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%2C%3CBR%20%2F%3EAdam%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-150151%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-150151%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%0A%3CP%3EI%20managed%20to%20find%20the%20issue%20with%20the%20script%2C%20in%20the%20command%20for%20the%20-Definition%20the%20%40%20should%20be%20replaced%20with%20%24%20and%20it%20worked%20fine.%3C%2FP%3E%0A%3CP%3ENew-AzureADPolicy%20-Definition%20%3CFONT%20color%3D%22%23ff0000%22%3E%3CSTRONG%3E%40%3C%2FSTRONG%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23000000%22%3EpolicyValue%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FFONT%3E%20-DisplayName%20B2BManagementPolicy%20-Type%20B2BManagementPolicy%20-IsOrganizationDefault%20%24true%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-150122%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-150122%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Monika%2C%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20update%2C%20please%20find%20the%20details%20accordingly.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E1.%20Output%20of%20your%20current%20Policy%20using%20following%20command%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.%5CSet-GuestAllowBlockDomainPolicy.ps1%20-Query%3C%2FP%3E%0A%3CP%3EPS%20D%3A%5Cdlp%26gt%3B%20.%5CSet-GuestAllowBlockDomainPolicy.ps1%20-Query%3CBR%20%2F%3ENo%20policy%20found%20for%20Allow%2FBlock%20domain%20list%20in%20AzureAD.%3C%2FP%3E%0A%3CP%3E2.%20The%20exact%20command%20which%20you%20are%20using%20for%20updating%20the%20policy.%3C%2FP%3E%0A%3CP%3EPS%20D%3A%5Cdlp%26gt%3B%20.%5CSet-GuestAllowBlockDomainPolicy.ps1%20-Update%20-AllowList%20%40(%22abctest.com%22)%3C%2FP%3E%0A%3CP%3E3.%26nbsp%3B%20Current%20Azure%20AD%20Version%20you%20are%20using.%20Run%20following%20in%20powershell%20to%20find%20the%20same%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Get-Module%20-ListAvailable%20AzureAD*%3C%2FP%3E%0A%3CP%3EPS%20D%3A%5Cdlp%26gt%3B%20Get-Module%20-ListAvailable%20AzureAD*%3CBR%20%2F%3EDirectory%3A%20C%3A%5CProgram%20Files%5CWindowsPowerShell%5CModules%3CBR%20%2F%3EModuleType%20Version%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Name%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ExportedCommands%3CBR%20%2F%3E----------%20-------%26nbsp%3B%26nbsp%3B%26nbsp%3B%20----%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20----------------%3CBR%20%2F%3EBinary%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%202.0.0.137%26nbsp%3B%20AzureADPreview%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7BAdd-AzureADApplicationOwner%2C%20Get-AzureADApplication%2C%20Get-...%3C%2FP%3E%0A%3CP%3E4.%26nbsp%3B%20Can%20you%20capture%20the%20fiddler%20traces%20while%20running%20the%20command%20and%20provide%20the%20same%20if%20possible%3C%2FP%3E%0A%3CP%3EUnable%20to%20attach%20the%20fiddler%20file.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-150101%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-150101%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Prabhakar%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECan%20you%20please%20provide%20following%20details%20in%20order%20to%20investigate%20this%20issue%20further%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E1.%20Output%20of%20your%20current%20Policy%20using%20following%20command%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20.%5CS%3CSPAN%3Eet-GuestAllowBlockDomainPolicy.ps1%20-Query%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E2.%20The%20exact%20command%20which%20you%20are%20using%20for%20updating%20the%20policy.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E3.%26nbsp%3B%20Current%20Azure%20AD%20Version%20you%20are%20using.%20Run%20following%20in%20powershell%20to%20find%20the%20same%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Get-Module%20-ListAvailable%20AzureAD*%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E4.%26nbsp%3B%20Can%20you%20capture%20the%20fiddler%20traces%20while%20running%20the%20command%20and%20provide%20the%20same%20if%20possible.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%2C%3C%2FP%3E%0A%3CP%3EMonika%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-149947%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-149947%22%20slang%3D%22en-US%22%3E%3CP%3EAdding%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F38147%22%20target%3D%22_blank%22%3E%40Sarat%20Subramaniam%3C%2FA%3E%26nbsp%3Bfor%20trouble%20shooting%20help.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-149925%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-149925%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Rob%2C%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20the%20information%2C%20I've%20got%20PS%205%20and%20now%20getting%20a%20different%20error%20message.%3C%2FP%3E%0A%3CP%3ESetting%20AllowedDomainList%20for%20B2BManagementPolicy%3CBR%20%2F%3ENew-AzureADPolicy%20%3A%20Cannot%20bind%20argument%20to%20parameter%20'Definition'%20because%20it%20is%20an%20empty%20collection.%3CBR%20%2F%3EAt%20D%3A%5Cdlp%5CSet-GuestAllowBlockDomainPolicy.ps1%3A325%20char%3A35%3CBR%20%2F%3E%2B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20New-AzureADPolicy%20-Definition%20%40policyValue%20-DisplayName%20B2BManage%20...%3CBR%20%2F%3E%2B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20~~~~~~~~~~~~%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2B%20CategoryInfo%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20InvalidData%3A%20(%3A)%20%5BNew-AzureADPolicy%5D%2C%20ParameterBindingValidationException%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2B%20FullyQualifiedErrorId%20%3A%20ParameterArgumentValidationErrorEmptyCollectionNotAllowed%2CMicrosoft.Open.MSGraphBeta.PowerShell.NewPolicy%3CBR%20%2F%3ENew%20AzureAD%20Policy%3A%3CBR%20%2F%3ECannot%20index%20into%20a%20null%20array.%3CBR%20%2F%3EAt%20D%3A%5Cdlp%5CSet-GuestAllowBlockDomainPolicy.ps1%3A330%20char%3A1%3CBR%20%2F%3E%2B%20PrintAllowBlockedList%20%24currentpolicy.Definition%5B0%5D%3B%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2B%20CategoryInfo%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20InvalidOperation%3A%20(%3A)%20%5B%5D%2C%20RuntimeException%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2B%20FullyQualifiedErrorId%20%3A%20NullArray%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-149748%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-149748%22%20slang%3D%22en-US%22%3EI%20had%20a%20support%20case%20open%20with%20MS%2C%20and%20they%20found%20that%20it%20was%20because%20I%20was%20using%20PowerShell%204%20(on%20Windows%207)%20-%20I%20updated%20to%20PowerShell%205%2C%20and%20the%20script%20then%20ran%20fine.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-149698%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-149698%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI've%20tried%20executing%20this%20script%20and%20I'm%20also%20getting%20the%20same%20error%20message%2C%20any%20update%20on%20how%20to%20resolve%3F%3C%2FP%3E%0A%3CP%3ESetting%20AllowedDomainList%20for%20B2BManagementPolicy%3CBR%20%2F%3ENew-AzureADPolicy%20%3A%20Error%20occurred%20while%20executing%20NewPolicy%3CBR%20%2F%3ECode%3A%20Request_BadRequest%3CBR%20%2F%3EMessage%3A%20One%20or%20more%20properties%20contains%20invalid%20values.%3CBR%20%2F%3EInnerError%3A%3CBR%20%2F%3E%26nbsp%3B%20RequestId%3A%203dbe4560-e2e7-47dd-9b46-f66ff31132da%3CBR%20%2F%3E%26nbsp%3B%20DateTimeStamp%3A%20Mon%2C%2029%20Jan%202018%2005%3A12%3A32%20GMT%3CBR%20%2F%3EHttpStatusCode%3A%20BadRequest%3CBR%20%2F%3EHttpStatusDescription%3A%20Bad%20Request%3CBR%20%2F%3EHttpResponseStatus%3A%20Completed%3CBR%20%2F%3EAt%20D%3A%5Cdlp%5CSet-GuestAllowBlockDomainPolicy.ps1%3A325%20char%3A5%3CBR%20%2F%3E%2B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20New-AzureADPolicy%20-Definition%20%24policyValue%20-DisplayName%20B2BManagementPolicy%26nbsp%3B%20...%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2B%20CategoryInfo%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20NotSpecified%3A%20(%3A)%20%5BNew-AzureADPolicy%5D%2C%20ApiException%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2B%20FullyQualifiedErrorId%20%3A%20Microsoft.Open.MSGraphBeta.Client.ApiException%2CMicrosoft.Open.MSGraphBeta.PowerShell.New%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%20Policy%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3ENew%20AzureAD%20Policy%3A%3CBR%20%2F%3ECannot%20index%20into%20a%20null%20array.%3CBR%20%2F%3EAt%20D%3A%5Cdlp%5CSet-GuestAllowBlockDomainPolicy.ps1%3A330%20char%3A1%3CBR%20%2F%3E%2B%20PrintAllowBlockedList%20%24currentpolicy.Definition%5B0%5D%3B%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2B%20CategoryInfo%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20InvalidOperation%3A%20(%3A)%20%5B%5D%2C%20RuntimeException%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2B%20FullyQualifiedErrorId%20%3A%20NullArray%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-146381%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-146381%22%20slang%3D%22en-US%22%3EI'm%20trying%20to%20use%20this%20script%2C%20but%20initially%20I%20was%20getting%20an%20error%20for%20line%20325%2C%20about%20an%20invalid%20parameter%20-InformationAction%20-%20so%20I%20removed%20that%20parameter.%3CBR%20%2F%3E%3CBR%20%2F%3ERunning%3A%3CBR%20%2F%3E%3CBR%20%2F%3ESet-GuestAllowBlockDomainPolicy.ps1%20-Update%20-AllowList%20%40(%22contoso.com%22)%3CBR%20%2F%3E%3CBR%20%2F%3EI%20now%20get%3A%3CBR%20%2F%3E%3CBR%20%2F%3ESetting%20AllowedDomainList%20for%20B2BManagementPolicy%3CBR%20%2F%3ENew-AzureADPolicy%20%3A%20Error%20occurred%20while%20executing%20NewPolicy%3CBR%20%2F%3ECode%3A%20Request_BadRequest%3CBR%20%2F%3EMessage%3A%20One%20or%20more%20properties%20contains%20invalid%20values.%3CBR%20%2F%3EInnerError%3A%3CBR%20%2F%3E%20RequestId%3A%20f7c9e44f-ffac-4f2a-8ff2-627ce077bd15%3CBR%20%2F%3E%20DateTimeStamp%3A%20Thu%2C%2018%20Jan%202018%2014%3A57%3A19%20GMT%3CBR%20%2F%3EHttpStatusCode%3A%20BadRequest%3CBR%20%2F%3EHttpStatusDescription%3A%20Bad%20Request%3CBR%20%2F%3EHttpResponseStatus%3A%20Completed%3CBR%20%2F%3EAt%20C%3A%5Cusers%5CXXXXX%5CDownloads%5CPowerShell%5C365Groups%5CSet-GuestAllowBlockDomainPolicy.ps1%3A325%20char%3A5%3CBR%20%2F%3E%2B%20New-AzureADPolicy%20-Definition%20%24policyValue%20-DisplayName%20B2BManagementPolicy%20...%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%20%2B%20CategoryInfo%20%3A%20NotSpecified%3A%20(%3A)%20%5BNew-AzureADPolicy%5D%2C%20ApiException%3CBR%20%2F%3E%20%2B%20FullyQualifiedErrorId%20%3A%20Microsoft.Open.MSGraphBeta.Client.ApiException%2CMicrosoft.Open.MSGraphBeta.PowerShell.New%3CBR%20%2F%3E%20Policy%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3ENew%20AzureAD%20Policy%3A%3CBR%20%2F%3ECannot%20index%20into%20a%20null%20array.%3CBR%20%2F%3E%3CBR%20%2F%3EAny%20thoughts%20please%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-92976%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-92976%22%20slang%3D%22en-US%22%3E%3CP%3E--%20Articl%20about%20the%20script%20---%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMicrosoft%20has%20launched%20a%20new%20external%20sharing%20policy%20for%20groups%20that%20allows%20tenants%20to%20set%20allow%20and%20block%20lists%20for%20domains.%20The%20new%20policy%20is%20due%20for%20use%20with%20Teams%2C%20Planner%2C%20and%20other%20applications%20that%20need%20to%20block%20external%20users%20from%20specific%20domains.%20It%E2%80%99s%20a%20set%20along%20the%20path%20to%20getting%20full%20external%20access%20for%20Office%20365%20apps.%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.petri.com%2Fexternal-access-policy-groups-teams-planner%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.petri.com%2Fexternal-access-policy-groups-teams-planner%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-92875%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-92875%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F8477%22%20target%3D%22_blank%22%3E%40Sahil%20Arora%3C%2FA%3E.%20Can%20you%20please%20also%20take%20a%20note%20on%20the%20feedback%20we%20(and%20many%20others!)%20have%20left%20over%20the%20past%20year%20or%20so%20about%20the%20%22usability%22%20of%20the%20AzureAD%20module%2C%20and%20if%20possible%20take%20steps%20to%20reduce%20the%20dependance%20on%20%22programmer%20notations%22%20for%20future%20releases.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-92870%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-92870%22%20slang%3D%22en-US%22%3E%3CP%3EGreat.%20The%20signed%20version%20will%20reassure%20many%20customers.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-92865%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-92865%22%20slang%3D%22en-US%22%3E%3CP%3EHere%20is%20the%20download%20link%20to%20the%20script%3A%20Signed%20by%20Microsoft%3A%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fdownload%2Fdetails.aspx%3Fid%3D55709%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fdownload%2Fdetails.aspx%3Fid%3D55709%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-92722%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-92722%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20your%20feedback!%20This%20is%20a%20representative%20script%20for%20IT%20admins%20to%20use%20as%20a%20reference%20while%20crafting%20their%20own%20based%20on%20their%20organization%20requirements.%20It%20is%20not%20a%20downloadable%20script.%20The%20downloadable%20link%20will%20be%20provided%20to%20you%20in%20few%20days%2C%20which%20will%20be%20signed%20by%20Microsoft.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-92522%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-92522%22%20slang%3D%22en-US%22%3E%3CP%3EIt's%20always%20a%20good%20idea%20to%20check%20scripts%20downloaded%20from%20the%20internet%20to%20get%20an%20understanding%20of%20what%20they%20do%20%3A)%3C%2Fimg%3E%26nbsp%3B%26nbsp%3B%20Anyway%2C%20we%20should%20already%20be%20accustomed%20to%20new%20features%20coming%20with%20a%20large%20sense%20of%26nbsp%3B%20'pioneering'%20when%20it%20comes%20to%20management.%20For%20example%2C%20with%20Groups%20settings%20administration%20you%20still%20need%20to%20through%20some%20hoops%20to%20creating%2Fupdate%20settings%20objects%2C%20and%20the%20new%20licensing%20cmdlets%20in%20AzureAD%20-%20especially%20when%20disabling%20features%20-%20are%20not%20the%20most%20intuitive.%20A%20cmdlet%2Fscript%20not%20only%20takes%20away%20all%20those%20details%20for%20admins%2C%20it%20also%20means%20less%20opportunities%20for%20error.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-92464%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-92464%22%20slang%3D%22en-US%22%3E%3CP%3EYes%2C%20but%20you%20do%20realize%20that%20many%20organizations%20have%20strict%20policies%20around%20running%20scripts%2C%20unsigned%20at%20that%3F%20Heck%2C%20I've%20even%20seen%20complaints%20about%20having%20to%20download%20the%20AzureAD%20module%20from%20%22non-MS%22%20source%20such%20as%20the%20PowerShell%20Gallery%2C%20but%20that's%20another%20story.%20In%20any%20case%2C%26nbsp%3BI%20need%20to%20go%20over%20all%20the%20300%2B%20lines%20of%20the%20script%20to%20make%20sure%20I%20understand%20what%20it%20does%2C%20before%20I%20run%20it.%20And%20I'm%20pretty%20much%20forced%20to%20do%20that%2C%20because%20the%20only%20examples%20I%20can%20find%20on%20how%20to%20actually%20run%20the%20cmdlet%20and%20which%20parameters%20to%20use%20are%20in%20that%20script.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDon't%20get%20me%20wrong%2C%20I%20really%20appreciate%20you%20providing%20a%20solution%20to%20this%20problem.%26nbsp%3BMy%20main%20complaint%20is%20usability%2C%20you%20could've%20easily%20made%20a%20cmdlet%20available%20that%20accepts%20the%20allow%2Fblock%20domain%20parameter%20and%20handles%20the%20JSON%20conversion%20internally.%20And%20that's%20a%20general%20complaint%20about%20pretty%20much%20every%20operation%20handled%20by%20the%20AzureAD%20module.%20Forcing%20us%20to%20work%20with%20ObjectIDs%2C%20JSON%20and%20whatnot%20is%20simply%20not%20cool.%20You%20should%20not%20be%20providing%20a%20solution%20that's%20convenient%20to%20you%20as%20programmers%2C%20but%20to%20the%20end%20users.%20If%20it's%20not%20in%20UI%20form%2C%20at%20least%20make%20it%20as%20easy%20as%20passing%20a%20simple%20parameter.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-92460%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-92460%22%20slang%3D%22en-US%22%3EQuestion%3A%20The%20page%20says%3A%3CBR%20%2F%3E%3CBR%20%2F%3EThis%20list%20doesn%E2%80%99t%20apply%20to%20already%20added%20guest%20members%2C%20this%20will%20be%20enforced%20for%20all%20the%20guests%20added%20after%20the%20list%20is%20set-up.%20However%2C%20you%20can%20remove%20them%20through%20the%20script.%3CBR%20%2F%3E%3CBR%20%2F%3EThat's%20fine%20-%20but%20I%20see%20no%20way%20to%20remove%20existing%20guest%20users%20from%20group%20memberships%20in%20the%20script.%20Am%20I%20missing%20something%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-92454%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-92454%22%20slang%3D%22en-US%22%3EBTW%2C%20is%20there%20any%20reason%20why%20the%20script%20is%20not%20signed%20by%20Microsoft%3F%20Running%20unverified%20scripts%20is%20not%20a%20habit%20that%20we%20should%20encourage%2C%20even%20if%20the%20script%20comes%20from%20Microsoft...%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-92449%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-92449%22%20slang%3D%22en-US%22%3EBTW%2C%20I%20agree%20with%20Vasil%20that%20if%20you%20provide%20a%20PowerShell%20cmdlet%20to%20update%20policies%20etc.%2C%20please%20hide%20all%20the%20JSON%20formatting%20crap%20behind%20the%20scenes%20so%20that%20%22normal%20people%22%20(let's%20define%20these%20folk%20as%20people%20who%20don't%20have%20the%20time%20or%20the%20inclination%20to%20mess%20around%20with%20JSON%20when%20they%20just%20want%20to%20update%20a%20setting%20-%20life%20is%20too%20short).%20Parameters%20like%20this%20should%20be%20simple%20strings%20like%20a%20list%20of%20domain%20names.%20For%20some%20unfathomable%20reason%2C%20Microsoft%20engineers%20working%20on%20Office%20365%20seem%20to%20love%20obfuscating%20simple%20things%20with%20JSON%20and%20GUIDs...%20Very%20strange!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-92445%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-92445%22%20slang%3D%22en-US%22%3E%3CP%3ETo%20be%20fair%20to%20Microsoft%2C%20this%20step%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3EMoves%20block%2Fallow%20lists%20into%20an%20AAD%20policy%20rather%20than%20introducing%20a%20dependency%20on%20a%20base%20workload%20(like%20SharePoint%20or%20Exchange).%3C%2FLI%3E%3CLI%3EUses%20a%20policy%20that%20is%20available%20to%20all%20group-enabled%20applications%20-%20which%20is%20why%20it%20is%20right%20to%20use%20a%20separate%20policy%20rather%20than%20adding%20it%20to%20the%20Groups%20AAD%20policy.%20That's%20in%20line%20with%20creating%20a%20common%20external%20access%20mechanism%20for%20all%20Office%20365%20apps%20(as%20I%20argue%20for%20in%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.petri.com%2Fcommon-external-access-office-365%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.petri.com%2Fcommon-external-access-office-365%3C%2FA%3E).%3C%2FLI%3E%3C%2FOL%3E%3CP%3EAlso%2C%20if%20you%20strip%20things%20away%2C%20you%20can%20get%20to%26nbsp%3B%3C%2FP%3E%3CP%3EUpdate%20an%20existing%20policy%3A%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CEM%3ENew-AzureADPolicy%20-Definition%20%24policyValue%20-DisplayName%20B2BManagementPolicy%20-Type%20B2BManagementPolicy%20-IsOrganizationDefault%20%24true%20-InformationAction%20Ignore%20%7C%20Out-Null%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3ECreate%20a%20new%20policy%3A%3C%2FP%3E%3CP%3E%3CEM%3E%3CSTRONG%3ESet-AzureADPolicy%20-Definition%20%24policyValue%20-Id%20%24currentpolicy.Id%20%7C%20Out-Null%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMost%20of%20the%20code%20in%20the%20script%20is%20error%20handling%20or%20software%20setup%2C%20which%20is%20what%20you'd%20expect%20in%20any%20utility%20written%20by%20Microsoft...%20Now%2C%20my%20scripts%20would%20be%20a%20lot%20simpler%2C%20but%20they'd%20have%20no%20error%20handling!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-92444%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-92444%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Vasil%2C%26nbsp%3B%3C%2FP%3E%0A%3CP%3E1.%20UI%20support%20is%20in%20the%20pipeline%20and%20we%20are%20targeting%20to%20have%20that%20soon.%3C%2FP%3E%0A%3CP%3E2.%20I%20hope%20you%20have%20seen%20the%20script%20here%20but%20to%20clarify%20we%20understand%20Azure%20Policy%20JSON%20argument%20can%20be%20difficult%20for%20normal%20people%20but%20if%20you%20see%20the%20script%2C%20the%20script%20does%20the%20job%20of%20converting%20the%20parameters%20as%20JSON%2C%20you%20just%20need%20to%20pass%20parameters%2C%20also%20this%20script%20works%20as%20a%20cmdlet%20if%20you%20run%20in%20a%20session%2C%20so%20in%20a%20way%20its%20very%20easy%20to%20run%20this%20script%2C%20if%20you%20save%20the%20script%20locally%20and%20run%20as%20cmdlet.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20the%20second%20message%2C%20I%20will%20definitely%20pass%20the%20feedback%20to%20update%20the%20set-azure%20policy.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-92441%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-92441%22%20slang%3D%22en-US%22%3E%3CP%3EAt%20the%20very%20least%2C%20can%20you%20please%20update%20the%20New%2FSet-AzureADPolicy%20cmdlet%20help%20to%20include%20examples%20on%20how%20to%20configure%20this.%20Perhaps%20also%20referencing%20the%20JSON%20helper%20functions%20from%20the%20example%20script%2C%20so%20that%20normal%20people%20can%20work%20with%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-92438%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Feature%20Announcement%3A%20PowerShell%20support%20of%20Allow%2FBlock%20guest%20access%20based%20on%20Domain%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-92438%22%20slang%3D%22en-US%22%3E%3CP%3ENot%20to%20be%20disrespectful%20here%2C%20I%20really%20appreciate%20the%20update.%20But%20how%20about%20providing%20UI%20settings%2C%20or%20at%20least%20a%20%22regular%20people%22%20version%20of%20the%20cmdlets%3F%20I%20mean%20sersiously%2C%20have%20you%20received%20at%20least%20one%20positive%20feedback%20item%20on%20the%20usability%20of%20these%20cmdlets%3F%20It%20takes%20a%20300%20pages%20script%20to%20just%20change%20a%20setting%2C%20cmon.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20why%20are%20half%20the%20settings%20controlled%20via%20%22settings%22%20and%20the%20other%20half%20via%20%22policies%22%3F%20The%20same%20thing%20that's%20used%20for%20token%20expiration%20settings%2C%20that%20will%20surely%20help%20reduce%20confusion...%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Sahil Arora
Microsoft

We are happy to announce the world wide roll-out of Allow/Block list support for guest access in O365 Groups. With this feature, IT Admins can set-up a list of domains to

  • Allow guest users of specific domains to be invited to Groups.
  • Block guest users of specific domains to be invited to Groups.

 

This policy currently can be set-up through PowerShell & coming soon through UI. We have provided user friendly script below to set-up allow/block list for your tenant.

 

This policy works for all workloads with Guest access through O365 Groups such as Outlook,  Teams & Planner in future. This work independently with SPO settings but we have provided support to

  • Migrate SPO allow/block list to O365 Groups

 

Here is the link to the detailed documentation & script to set this policy: https://technet.microsoft.com/library/a86bb46f-0e5b-43a3-b6ef-7394f344a8da

 

Feel free to reach out if you any feedback and questions!

 

We will be supporting this functionality in OAC(Office Admin Portal) through user interface soon.

 

Thanks,

Sahil

23 Replies

Not to be disrespectful here, I really appreciate the update. But how about providing UI settings, or at least a "regular people" version of the cmdlets? I mean sersiously, have you received at least one positive feedback item on the usability of these cmdlets? It takes a 300 pages script to just change a setting, cmon.

 

And why are half the settings controlled via "settings" and the other half via "policies"? The same thing that's used for token expiration settings, that will surely help reduce confusion...

At the very least, can you please update the New/Set-AzureADPolicy cmdlet help to include examples on how to configure this. Perhaps also referencing the JSON helper functions from the example script, so that normal people can work with it.

Hi Vasil, 

1. UI support is in the pipeline and we are targeting to have that soon.

2. I hope you have seen the script here but to clarify we understand Azure Policy JSON argument can be difficult for normal people but if you see the script, the script does the job of converting the parameters as JSON, you just need to pass parameters, also this script works as a cmdlet if you run in a session, so in a way its very easy to run this script, if you save the script locally and run as cmdlet.

 

For the second message, I will definitely pass the feedback to update the set-azure policy.

To be fair to Microsoft, this step:

 

  1. Moves block/allow lists into an AAD policy rather than introducing a dependency on a base workload (like SharePoint or Exchange).
  2. Uses a policy that is available to all group-enabled applications - which is why it is right to use a separate policy rather than adding it to the Groups AAD policy. That's in line with creating a common external access mechanism for all Office 365 apps (as I argue for in https://www.petri.com/common-external-access-office-365).

Also, if you strip things away, you can get to 

Update an existing policy:

New-AzureADPolicy -Definition $policyValue -DisplayName B2BManagementPolicy -Type B2BManagementPolicy -IsOrganizationDefault $true -InformationAction Ignore | Out-Null

Create a new policy:

Set-AzureADPolicy -Definition $policyValue -Id $currentpolicy.Id | Out-Null

 

Most of the code in the script is error handling or software setup, which is what you'd expect in any utility written by Microsoft... Now, my scripts would be a lot simpler, but they'd have no error handling!

BTW, I agree with Vasil that if you provide a PowerShell cmdlet to update policies etc., please hide all the JSON formatting crap behind the scenes so that "normal people" (let's define these folk as people who don't have the time or the inclination to mess around with JSON when they just want to update a setting - life is too short). Parameters like this should be simple strings like a list of domain names. For some unfathomable reason, Microsoft engineers working on Office 365 seem to love obfuscating simple things with JSON and GUIDs... Very strange!
BTW, is there any reason why the script is not signed by Microsoft? Running unverified scripts is not a habit that we should encourage, even if the script comes from Microsoft...
Question: The page says:

This list doesn’t apply to already added guest members, this will be enforced for all the guests added after the list is set-up. However, you can remove them through the script.

That's fine - but I see no way to remove existing guest users from group memberships in the script. Am I missing something?

Yes, but you do realize that many organizations have strict policies around running scripts, unsigned at that? Heck, I've even seen complaints about having to download the AzureAD module from "non-MS" source such as the PowerShell Gallery, but that's another story. In any case, I need to go over all the 300+ lines of the script to make sure I understand what it does, before I run it. And I'm pretty much forced to do that, because the only examples I can find on how to actually run the cmdlet and which parameters to use are in that script.

 

Don't get me wrong, I really appreciate you providing a solution to this problem. My main complaint is usability, you could've easily made a cmdlet available that accepts the allow/block domain parameter and handles the JSON conversion internally. And that's a general complaint about pretty much every operation handled by the AzureAD module. Forcing us to work with ObjectIDs, JSON and whatnot is simply not cool. You should not be providing a solution that's convenient to you as programmers, but to the end users. If it's not in UI form, at least make it as easy as passing a simple parameter.

It's always a good idea to check scripts downloaded from the internet to get an understanding of what they do :)   Anyway, we should already be accustomed to new features coming with a large sense of  'pioneering' when it comes to management. For example, with Groups settings administration you still need to through some hoops to creating/update settings objects, and the new licensing cmdlets in AzureAD - especially when disabling features - are not the most intuitive. A cmdlet/script not only takes away all those details for admins, it also means less opportunities for error.

Thanks for your feedback! This is a representative script for IT admins to use as a reference while crafting their own based on their organization requirements. It is not a downloadable script. The downloadable link will be provided to you in few days, which will be signed by Microsoft.

Great. The signed version will reassure many customers.

Thanks @Sahil Arora. Can you please also take a note on the feedback we (and many others!) have left over the past year or so about the "usability" of the AzureAD module, and if possible take steps to reduce the dependance on "programmer notations" for future releases.

-- Articl about the script ---

 

Microsoft has launched a new external sharing policy for groups that allows tenants to set allow and block lists for domains. The new policy is due for use with Teams, Planner, and other applications that need to block external users from specific domains. It’s a set along the path to getting full external access for Office 365 apps.
https://www.petri.com/external-access-policy-groups-teams-planner

I'm trying to use this script, but initially I was getting an error for line 325, about an invalid parameter -InformationAction - so I removed that parameter.

Running:

Set-GuestAllowBlockDomainPolicy.ps1 -Update -AllowList @("contoso.com")

I now get:

Setting AllowedDomainList for B2BManagementPolicy
New-AzureADPolicy : Error occurred while executing NewPolicy
Code: Request_BadRequest
Message: One or more properties contains invalid values.
InnerError:
RequestId: f7c9e44f-ffac-4f2a-8ff2-627ce077bd15
DateTimeStamp: Thu, 18 Jan 2018 14:57:19 GMT
HttpStatusCode: BadRequest
HttpStatusDescription: Bad Request
HttpResponseStatus: Completed
At C:\users\XXXXX\Downloads\PowerShell\365Groups\Set-GuestAllowBlockDomainPolicy.ps1:325 char:5
+ New-AzureADPolicy -Definition $policyValue -DisplayName B2BManagementPolicy ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzureADPolicy], ApiException
+ FullyQualifiedErrorId : Microsoft.Open.MSGraphBeta.Client.ApiException,Microsoft.Open.MSGraphBeta.PowerShell.New
Policy


New AzureAD Policy:
Cannot index into a null array.

Any thoughts please?

Hi,

 

I've tried executing this script and I'm also getting the same error message, any update on how to resolve?

Setting AllowedDomainList for B2BManagementPolicy
New-AzureADPolicy : Error occurred while executing NewPolicy
Code: Request_BadRequest
Message: One or more properties contains invalid values.
InnerError:
  RequestId: 3dbe4560-e2e7-47dd-9b46-f66ff31132da
  DateTimeStamp: Mon, 29 Jan 2018 05:12:32 GMT
HttpStatusCode: BadRequest
HttpStatusDescription: Bad Request
HttpResponseStatus: Completed
At D:\dlp\Set-GuestAllowBlockDomainPolicy.ps1:325 char:5
+     New-AzureADPolicy -Definition $policyValue -DisplayName B2BManagementPolicy  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-AzureADPolicy], ApiException
    + FullyQualifiedErrorId : Microsoft.Open.MSGraphBeta.Client.ApiException,Microsoft.Open.MSGraphBeta.PowerShell.New
   Policy


New AzureAD Policy:
Cannot index into a null array.
At D:\dlp\Set-GuestAllowBlockDomainPolicy.ps1:330 char:1
+ PrintAllowBlockedList $currentpolicy.Definition[0];
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

I had a support case open with MS, and they found that it was because I was using PowerShell 4 (on Windows 7) - I updated to PowerShell 5, and the script then ran fine.

Hi Rob,

Thank you for the information, I've got PS 5 and now getting a different error message.

Setting AllowedDomainList for B2BManagementPolicy
New-AzureADPolicy : Cannot bind argument to parameter 'Definition' because it is an empty collection.
At D:\dlp\Set-GuestAllowBlockDomainPolicy.ps1:325 char:35
+     New-AzureADPolicy -Definition @policyValue -DisplayName B2BManage ...
+                                   ~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [New-AzureADPolicy], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyCollectionNotAllowed,Microsoft.Open.MSGraphBeta.PowerShell.NewPolicy
New AzureAD Policy:
Cannot index into a null array.
At D:\dlp\Set-GuestAllowBlockDomainPolicy.ps1:330 char:1
+ PrintAllowBlockedList $currentpolicy.Definition[0];
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

 

Hi Prabhakar,

 

Can you please provide following details in order to investigate this issue further?

 

1. Output of your current Policy using following command:

        .\Set-GuestAllowBlockDomainPolicy.ps1 -Query

 

2. The exact command which you are using for updating the policy.

 

3.  Current Azure AD Version you are using. Run following in powershell to find the same:

        Get-Module -ListAvailable AzureAD*

 

4.  Can you capture the fiddler traces while running the command and provide the same if possible.

 

Thanks,

Monika

Hi Monika,

Thanks for your update, please find the details accordingly.


1. Output of your current Policy using following command:

        .\Set-GuestAllowBlockDomainPolicy.ps1 -Query

PS D:\dlp> .\Set-GuestAllowBlockDomainPolicy.ps1 -Query
No policy found for Allow/Block domain list in AzureAD.

2. The exact command which you are using for updating the policy.

PS D:\dlp> .\Set-GuestAllowBlockDomainPolicy.ps1 -Update -AllowList @("abctest.com")

3.  Current Azure AD Version you are using. Run following in powershell to find the same:

        Get-Module -ListAvailable AzureAD*

PS D:\dlp> Get-Module -ListAvailable AzureAD*
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Binary     2.0.0.137  AzureADPreview                      {Add-AzureADApplicationOwner, Get-AzureADApplication, Get-...

4.  Can you capture the fiddler traces while running the command and provide the same if possible

Unable to attach the fiddler file.

Hi All,

I managed to find the issue with the script, in the command for the -Definition the @ should be replaced with $ and it worked fine.

New-AzureADPolicy -Definition @policyValue -DisplayName B2BManagementPolicy -Type B2BManagementPolicy -IsOrganizationDefault $true

Sahil,

Do you have an estimated date of when the allow/block list feature will be added to the Office Admin Portal user interface?

Also, are there any plans to add per-group sharing controls for Office 365 Groups similar to what is already in place for SharePoint online? (https://support.office.com/en-us/article/Per-group-sharing-controls-in-SharePoint-Online-26581d50-ff...)

Thanks,
Adam