Forum Discussion

jasonsmith1515's avatar
jasonsmith1515
Copper Contributor
Jan 13, 2023

Powershell Set-AuthenticationPolicy issues

Hello, I'm trying to selectively enable basic authentication on a service account for use with our backup system to back up Exchange public folders.

 

I believe the syntax should be: 

 

 

 

Set-AuthenticationPolicy -Identity email address removed for privacy reasons -AllowBasicAuthAutodiscover

 

 

 

 

 

But that returns an error:

 

 

 

 

Write-ErrorMessage : Ex6F9304|Microsoft.Exchange.Configuration.Tasks.ManagementObjectNotFoundException|The operation
couldn't be performed because object 'email address removed for privacy reasons' couldn't be found on
'MWHPR04A06DC004.NAMPR04A006.PROD.OUTLOOK.COM'.
At C:\Users\User\AppData\Local\Temp\tmpEXO_uokxac5b.pq4\tmpEXO_uokxac5b.pq4.psm1:1098 char:13
+ Write-ErrorMessage $ErrorObject
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-AuthenticationPolicy], ManagementObjectNotFoundException
+ FullyQualifiedErrorId : [Server=CH0PR16MB4330,RequestId=8ce97291-b766-650a-eb43-53b0f5af836c,TimeStamp=Wed, 11 J
an 2023 20:41:47 GMT],Write-ErrorMessage

 

 

 

 

I've verified that the identity is correct with "get-user -identity email address removed for privacy reasons" and it returns the correct information. Why would that identity not be found by Set-AuthenticationPolicy? I've tried with various identities (including my own), all live active accounts, and get the same result each time.

 

Any help would be appreciated!

  • Set-AuthenticationPolicy is used for modifying the policy object itself, it does not relate to specific users. First, get the list of policies (Get-AuthenticationPolicy), or if no policies are configured, create a new one (New-AuthenticationPolicy). Then, toggle the settings as needed:

    Set-AuthenticationPolicy PolicyID_obtained_above -AllowBasicAuthAutodiscover $true

    Lastly, to assign a given policy to a user, use:

    Set-User email address removed for privacy reasons -AuthenticationPolicy PolicyId
  • Set-AuthenticationPolicy is used for modifying the policy object itself, it does not relate to specific users. First, get the list of policies (Get-AuthenticationPolicy), or if no policies are configured, create a new one (New-AuthenticationPolicy). Then, toggle the settings as needed:

    Set-AuthenticationPolicy PolicyID_obtained_above -AllowBasicAuthAutodiscover $true

    Lastly, to assign a given policy to a user, use:

    Set-User email address removed for privacy reasons -AuthenticationPolicy PolicyId
    • jasonsmith1515's avatar
      jasonsmith1515
      Copper Contributor

      Oh, that is VERY helpful! I'll give that a shot, thank you very much!

       

      ::edit:: Yup that totally did it, thank you again!

Resources