Microsoft Graph: The property is missing a required prefix/suffix......

%3CLINGO-SUB%20id%3D%22lingo-sub-1388521%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Graph%3A%20The%20property%20is%20missing%20a%20required%20prefix%2Fsuffix......%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1388521%22%20slang%3D%22en-US%22%3E%3CP%3EWhere%20did%20you%20see%20that%20statement%20about%26nbsp%3B%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20font-family%3A%20'SegoeUI'%2C'Lato'%2C'Helvetica%20Neue'%2CHelvetica%2CArial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3EDirectory.ReadWrite.All%3C%2FSPAN%3E%3F%20And%20does%20it%20apply%20to%20both%20application%20and%20delegated%20permissions%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1392847%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Graph%3A%20The%20property%20is%20missing%20a%20required%20prefix%2Fsuffix......%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1392847%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENever%20found%20it%20on%20any%20Microsoft%20site%2C%20found%20that%20information%20on%20couple%20of%20the%20many%20website%20I%20searched%20looking%20for%20a%20solution.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20next%20plan%20is%20to%20see%20if%20I%20add%20a%20global%20admin%20credential%20to%20my%26nbsp%3BInvoke-RestMethod%20-Credential%20%24Cred%20would%20allow%20me%20to%20change%20Display%20Name.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20You%20for%20responding.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-Larry%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1387516%22%20slang%3D%22en-US%22%3EMicrosoft%20Graph%3A%20The%20property%20is%20missing%20a%20required%20prefix%2Fsuffix......%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1387516%22%20slang%3D%22en-US%22%3E%3CP%3ETrying%20to%20change%20the%20Display%20Name%20on%20a%20group%20using%20Graph%20in%20a%20PowerShell%20script.%20When%20I%20execute%20the%20script%20I%20receive%20the%20following%20error%3A%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23FF0000%22%3E%22%3CSTRONG%3EThe%20property%20is%20missing%20a%20required%20prefix%2Fsuffix%20per%20your%20organization's%20Group%20naming%20requirements.%22%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3EFrom%20my%20reading%20if%20I%20have%20the%20permission%20Directory.ReadWrite.All%2C%20it%20should%20override%20the%20policy.%3C%2FP%3E%3CP%3EThis%20policy%20was%20design%20that%20when%20a%20user%20creates%20a%20Team%20we%20prefix%20the%20created%20Group%2FTeam's%20Display%20Name%20with%20the%20user's%20department%20number.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELooking%20for%20a%20solution%20to%20this%20problem%2C%20this%20is%20our%20first%20annual%20end%20of%20cycle%20and%20I'm%20require%20to%20change%20over%201000%20groups%20display%20name.%20I%20rather%20use%20Graph%20then%20powershell%20cmdlets%20to%20change%20the%20Display%20Name.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3Eexcerpt%3C%2FSTRONG%3E%3CSTRONG%3E%26nbsp%3Bof%20the%20script%3A%3C%2FSTRONG%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%233366FF%22%3E%24URI%20%3D%20%22%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fgroups%2Fxxxxxxxx-xxxx-xxxx-xxxx-xxGROUPx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fgroups%2Fxxxxxxxx-xxxx-xxxx-xxxx-xxGROUPx%3C%2FA%3E%22%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%233366FF%22%3E%24NewName%20%3D%20%40%7B%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%233366FF%22%3E%22description%22%20%3D%20%22EOSY%20-%202-D%20Studio%20Art%201-06-37%22%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%233366FF%22%3E%22displayname%22%20%3D%20%22EXP_19-20%20-%202-D%20Studio%20Art%201-06-37%22%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%233366FF%22%3E%7D%20%7C%20ConvertTo-Json%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%233366FF%22%3E%24Results%20%3D%20Invoke-RestMethod%20-Method%20PATCH%20-Uri%20%24URI%20-Headers%20%24Header%20-Body%20%24NewName%20-ContentType%20'application%2Fjson'%3C%2FFONT%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EPermissions%20on%20Application%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22GraphAppPermission.JPG%22%20style%3D%22width%3A%20233px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F191447iA506277E131FFC21%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22GraphAppPermission.JPG%22%20alt%3D%22GraphAppPermission.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20any%20help%20in%20this%20matter.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-Larry%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1387516%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20AD%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EIdentity%20Management%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1641263%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Graph%3A%20The%20property%20is%20missing%20a%20required%20prefix%2Fsuffix......%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1641263%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F103153%22%20target%3D%22_blank%22%3E%40Larry%20Jones%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDid%20you%20find%20a%20solution%3F%20We%20also%20have%20a%20naming%20convention%20in%20place%20and%20want%20to%20create%20Teams%20by%20the%20API%20without%20following%20the%20naming%20convention%20of%20all%20the%20other%20users.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1643917%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Graph%3A%20The%20property%20is%20missing%20a%20required%20prefix%2Fsuffix......%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1643917%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F533323%22%20target%3D%22_blank%22%3E%40StephanGee%3C%2FA%3E%26nbsp%3B%20Unfortunately%20no!!..%20i%20went%20with%20Azure%20AD%20PowerShell%20command%20to%20rename%20groups.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-Larry%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

Trying to change the Display Name on a group using Graph in a PowerShell script. When I execute the script I receive the following error:

"The property is missing a required prefix/suffix per your organization's Group naming requirements."
From my reading if I have the permission Directory.ReadWrite.All, it should override the policy.

This policy was design that when a user creates a Team we prefix the created Group/Team's Display Name with the user's department number. 

 

Looking for a solution to this problem, this is our first annual end of cycle and I'm require to change over 1000 groups display name. I rather use Graph then powershell cmdlets to change the Display Name.

 

excerpt of the script: 

$URI = "https://graph.microsoft.com/v1.0/groups/xxxxxxxx-xxxx-xxxx-xxxx-xxGROUPx"

 

$NewName = @{
"description" = "EOSY - 2-D Studio Art 1-06-37"
"displayname" = "EXP_19-20 - 2-D Studio Art 1-06-37"
} | ConvertTo-Json

 

$Results = Invoke-RestMethod -Method PATCH -Uri $URI -Headers $Header -Body $NewName -ContentType 'application/json'

Permissions on Application:

 

GraphAppPermission.JPG

 

Thank you for any help in this matter.

 

-Larry

 

4 Replies
Highlighted

Where did you see that statement about Directory.ReadWrite.All? And does it apply to both application and delegated permissions? 

Highlighted

@Vasil Michev 

 

Never found it on any Microsoft site, found that information on couple of the many website I searched looking for a solution. 

 

My next plan is to see if I add a global admin credential to my Invoke-RestMethod -Credential $Cred would allow me to change Display Name.

 

Thank You for responding.

 

-Larry

 

 

Highlighted

@Larry Jones 

Did you find a solution? We also have a naming convention in place and want to create Teams by the API without following the naming convention of all the other users.

Highlighted

@StephanGee  Unfortunately no!!.. i went with Azure AD PowerShell command to rename groups.

 

-Larry