Forum Discussion

  • Hi!

     

    We would like to implement a naming policy that adds custom attribute number 14 from Azure AD as a prefix. Is that possible? What is the syntax for fetching that custom attribute?

     

    Would you say it is safe to add the naming policy in a production environment even though it is still in Public Beta and not GA?

    • TonyRedmond's avatar
      TonyRedmond
      MVP

      AFAIK, the Azure AD naming policy doesn't take a custom attribute into account when it constructs names. This would be easy to do with PowerShell by updating the DisplayName attribute with whatever's in CustomAttribute14 after a group exists.

      • TonyRedmond's avatar
        TonyRedmond
        MVP

        And it is safe to use the policy. All it's doing is making sure that the DisplayName attribute is correctly populated. You can do that yourself or let the policy do it.

  • is there a time delay on a change like this?  I've confirmed these settings are in place (almost 6 hours ago), and they don't seem to be enforced yet.

    • TonyRedmond's avatar
      TonyRedmond
      MVP

      It's now public, but I thought it was pretty public when Microsoft revealed the policy at Ignite 2016 (announcement) and then discussed its operation in depth at Ignite 2017. What has changed is that Microsoft call this an AAD naming policy now... maybe to help justify the need for AAD premium licenses.

       

      https://www.petri.com/office-365-groups-naming-policy

    • Dean_Gross's avatar
      Dean_Gross
      Silver Contributor

      Any idea why I'm getting the following error when I try the sample code ? i have AzureADPreview 2.0.0.154 installed

       

      $Setting = Get-AzureADDirectorySetting -Id (Get-AzureADDirectorySetting | where -Property DisplayName -Value "Group.Unified" -EQ).id
      Get-AzureADDirectorySetting : Cannot bind argument to parameter 'Id' because it is null.
      At line:1 char:44
      + ... Setting -Id (Get-AzureADDirectorySetting | where -Property DisplayNam ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : InvalidData: (:) [Get-AzureADDirectorySetting], ParameterBindingValidationException
      + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.Open.MSGraphBeta.PowerShell.GetDirectorySetting

      • TonyRedmond's avatar
        TonyRedmond
        MVP

        You're connected to Azure AD - right? It could be that the quotation marks surrounding Group.Unified are printer's quotations rather than the straight quotation marks required by PowerShell. That often happens when you cut and paste commands from articles.

         

        What does running the command below show? You can see my complete policy...

         

        PS C:\temp> Get-AzureAdDirectorySetting | ForEach Values
        
        Name                          Value
        ----                          -----
        CustomBlockedWordsList        Sexy,Stupid,Giggles,Funny,CFO,CEO,**bleep**,Payroll,Supercalifragilisticexpialidocious,Silly
        EnableMSStandardBlockedWords  false
        ClassificationDescriptions    General Use:Anyone can access,External Access:Available outside the company,Internal Only:Must not b...
        DefaultClassification         Confidential
        PrefixSuffixNamingRequirement O365Grp-[GroupName]
        AllowGuestsToBeGroupOwner     False
        AllowGuestsToAccessGroups     True
        GuestUsageGuidelinesUrl       Http://office365itpros.com/GuestUserGuidelines.html
        GroupCreationAllowedGroupId   12cb915b-2365-4bed-baf6-6257b3543273
        AllowToAddGuests              True
        UsageGuidelinesUrl            Http://office365exchange.com/GroupGuidelines.html
        ClassificationList            General Use,External Access,Internal Only,Confidential
        EnableGroupCreation           False

         I 

Resources