SOLVED

Unable to Set-MailboxFolderPermission

%3CLINGO-SUB%20id%3D%22lingo-sub-539623%22%20slang%3D%22en-US%22%3EUnable%20to%20Set-MailboxFolderPermission%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-539623%22%20slang%3D%22en-US%22%3E%3CP%3EUnable%20to%20Set-MailboxFolderPermission%20example%40test.fi%20-user%20Default%20-accessrights%20reviewer.%20Error%20message%20says%20that%26nbsp%3B%22There%20is%20no%20existing%20permission%20entry%20found%20for%20user%22..%20We%20think%20this%20is%20because%20of%20Finnish%20language%20settings%20that%20automatically%20convert%20value%20%22Default%22%20to%20%22Oletus%22%20in%20powershell%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EError%20on%20proxy%20command%20'Set-MailboxFolderPermission%20-User%3A'Oletus'%20-AccessRights%3A'Reviewer'%20-Identity%3A'example%40test.fi'%20-Confirm%3A%24False'%20to%20server%20AM6PR01MB4295.eurprd01.prod.exchangelabs.com%3A%20Server%20version%2015.20.1856.00%3CBR%20%2F%3E00%2C%20Proxy%20method%20PSWS%3A%3CBR%20%2F%3ECmdlet%20error%20with%20following%20error%20message%3A%3CBR%20%2F%3EMicrosoft.Exchange.Management.StoreTasks.UserNotFoundInPermissionEntryException%3A%20There%20is%20no%20existing%20permission%20entry%3CBR%20%2F%3Efound%20for%20user%3A%20Oletus.%3CBR%20%2F%3Eat%20Microsoft.Exchange.Management.StoreTasks.SetMailboxFolderPermissionBase.ThrowUserNotFoundException()%3CBR%20%2F%3Eat%20Microsoft.Exchange.Management.StoreTasks.SetMailboxFolderPermission.InternalProcessPermissions(Folder%20folder)%3CBR%20%2F%3Eat%20Microsoft.Exchange.Management.StoreTasks.SetMailboxFolderPermissionBase.InternalProcessRecord()%3CBR%20%2F%3Eat%20Microsoft.Exchange.Configuration.Tasks.Task.%3CPROCESSRECORD%3Eb__93_1()%3CBR%20%2F%3Eat%20Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String%20funcName%2C%20Action%20func%2C%20Boolean%20terminatePi%3CBR%20%2F%3EpelineIfFailed).%20%5BServer%3DDB6P190MB0311%2CRequestId%3D46a17ea7-9add-47bc-abee-499e5e64e66c%2CTimeStamp%3D7.5.2019%208.31.23%5D%20.%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20NotSpecified%3A%20(%3A)%20%5BSet-MailboxFolderPermission%5D%2C%20CmdletProxyException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20Microsoft.Exchange.Configuration.CmdletProxyException%2CMicrosoft.Exchange.Management.Stor%3CBR%20%2F%3EeTasks.SetMailboxFolderPermission%3CBR%20%2F%3E%2B%20PSComputerName%20%3A%20outlook.office365.com%3C%2FPROCESSRECORD%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20ideas%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-539623%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExchange%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%20Powershell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-542680%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20Set-MailboxFolderPermission%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-542680%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20might%20simply%20have%20an%20folder%20with%20the%20default%20entry%20deleted%2C%20in%20which%20case%20use%20the%20Add-MailboxFolderPermission%20cmdlet%20instead.%20The%20language%20shouldn't%20matter%2C%20as%20long%20as%20you%20enclose%20the%20string%20in%20quotes.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-552158%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20Set-MailboxFolderPermission%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-552158%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%3BNope.%20Add%3CSPAN%3E-MailboxFolderPermission%20example%40test.fi%20-user%20Default%20-accessrights%20reviewer%3C%2FSPAN%3E%2C%26nbsp%3BCmdlet%20error%20with%20following%20error%20message%3A%20Microsoft.Exchange.Management.StoreTasks.InvalidExternalUserIdException%3A%20The%20user%20%22Oletus%22%20is%20either%20not%20valid%20SMTP%20address%2C%20or%20there%20is%20no%20matching%20information.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOnce%20again%20%22Default%22%20is%20automatically%20converted%20to%20%22Oletus%22%20and%20not%20working.%20Same%20thing%2C%20remove-MailboxFolderPermission.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20also%20try%20to%20use%20quotes%26nbsp%3B'Default'%20and%20%22default%22%20but%20not%20helping.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-553898%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20Set-MailboxFolderPermission%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-553898%22%20slang%3D%22en-US%22%3E%3CP%3EWell%2C%20for%20some%20reason%20the%20culture%20cmdlets%20don't%20seem%20to%20work%20on%20my%20machine%2C%20but%20try%20using%20Set-Culture%20first%20before%20running%20the%20cmdlet.%20Or%20just%20use%20an%20English%20box%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-557141%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20Set-MailboxFolderPermission%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-557141%22%20slang%3D%22en-US%22%3E%3CP%3EOk%2C%20Thanks.%20Issue%20resolved.%3C%2FP%3E%3CP%3EFirst%20%22Set-Culture%20-CultureInfo%20en-us%22%20and%20then%20open%20new%20powershell%20session.%3C%2FP%3E%3CDIV%20class%3D%22line%20number1%20index0%20alt2%22%3E%24modules%20%3D%20%40(Get-ChildItem%20-Path%20%22%24(%24env%3ALOCALAPPDATA)%5CApps%5C2.0%22%20-Filter%20%22Microsoft.Exchange.Management.ExoPowershellModule.manifest%22%20-Recurse%20)%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number2%20index1%20alt1%22%3E%24moduleName%20%3D%26nbsp%3B%26nbsp%3BJoin-Path%20%24modules%5B0%5D.Directory.FullName%20%22Microsoft.Exchange.Management.ExoPowershellModule.dll%22%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number3%20index2%20alt2%22%3EImport-Module%20-FullyQualifiedName%20%24moduleName%20-Force%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number4%20index3%20alt1%22%3E%24scriptName%20%3D%26nbsp%3B%26nbsp%3BJoin-Path%20%24modules%5B0%5D.Directory.FullName%20%22CreateExoPSSession.ps1%22%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number5%20index4%20alt2%22%3E.%20%24scriptName%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number6%20index5%20alt1%22%3E%24null%20%3D%20Connect-EXOPSSession%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number6%20index5%20alt1%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number6%20index5%20alt1%22%3E%3CA%20href%3D%22https%3A%2F%2Fblogs.technet.microsoft.com%2Fcanitpro%2F2017%2F08%2F23%2Fpowershell-basics-connecting-to-exchange-online-using-multi-factor-authentication%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fblogs.technet.microsoft.com%2Fcanitpro%2F2017%2F08%2F23%2Fpowershell-basics-connecting-to-exchange-online-using-multi-factor-authentication%2F%3C%2FA%3E%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number6%20index5%20alt1%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number6%20index5%20alt1%22%3EKey%20here%20is%20to%20open%20new%20powershell%20session%20else%26nbsp%3BSet-Culture%20does%20not%20work.%3C%2FDIV%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Unable to Set-MailboxFolderPermission example@test.fi -user Default -accessrights reviewer. Error message says that "There is no existing permission entry found for user".. We think this is because of Finnish language settings that automatically convert value "Default" to "Oletus" in powershell:

 

Error on proxy command 'Set-MailboxFolderPermission -User:'Oletus' -AccessRights:'Reviewer' -Identity:'example@test.fi' -Confirm:$False' to server AM6PR01MB4295.eurprd01.prod.exchangelabs.com: Server version 15.20.1856.00
00, Proxy method PSWS:
Cmdlet error with following error message:
Microsoft.Exchange.Management.StoreTasks.UserNotFoundInPermissionEntryException: There is no existing permission entry
found for user: Oletus.
at Microsoft.Exchange.Management.StoreTasks.SetMailboxFolderPermissionBase.ThrowUserNotFoundException()
at Microsoft.Exchange.Management.StoreTasks.SetMailboxFolderPermission.InternalProcessPermissions(Folder folder)
at Microsoft.Exchange.Management.StoreTasks.SetMailboxFolderPermissionBase.InternalProcessRecord()
at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__93_1()
at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePi
pelineIfFailed). [Server=DB6P190MB0311,RequestId=46a17ea7-9add-47bc-abee-499e5e64e66c,TimeStamp=7.5.2019 8.31.23] .
+ CategoryInfo : NotSpecified: (:) [Set-MailboxFolderPermission], CmdletProxyException
+ FullyQualifiedErrorId : Microsoft.Exchange.Configuration.CmdletProxyException,Microsoft.Exchange.Management.Stor
eTasks.SetMailboxFolderPermission
+ PSComputerName : outlook.office365.com

 

Any ideas?

4 Replies
Highlighted

You might simply have an folder with the default entry deleted, in which case use the Add-MailboxFolderPermission cmdlet instead. The language shouldn't matter, as long as you enclose the string in quotes.

Highlighted

@Vasil Michev Nope. Add-MailboxFolderPermission example@test.fi -user Default -accessrights reviewer, Cmdlet error with following error message: Microsoft.Exchange.Management.StoreTasks.InvalidExternalUserIdException: The user "Oletus" is either not valid SMTP address, or there is no matching information.

 

Once again "Default" is automatically converted to "Oletus" and not working. Same thing, remove-MailboxFolderPermission.

 

I also try to use quotes 'Default' and "default" but not helping.

Highlighted

Well, for some reason the culture cmdlets don't seem to work on my machine, but try using Set-Culture first before running the cmdlet. Or just use an English box :)

Highlighted
Best Response confirmed by eeri1540 (New Contributor)
Solution

Ok, Thanks. Issue resolved.

First "Set-Culture -CultureInfo en-us" and then open new powershell session.

$modules = @(Get-ChildItem -Path "$($env:LOCALAPPDATA)\Apps\2.0" -Filter "Microsoft.Exchange.Management.ExoPowershellModule.manifest" -Recurse )
$moduleName =  Join-Path $modules[0].Directory.FullName "Microsoft.Exchange.Management.ExoPowershellModule.dll"
Import-Module -FullyQualifiedName $moduleName -Force
$scriptName =  Join-Path $modules[0].Directory.FullName "CreateExoPSSession.ps1"
. $scriptName
$null = Connect-EXOPSSession
 
 
Key here is to open new powershell session else Set-Culture does not work.