Getting the below error once i try to add TtmCdEnvironment id in SDL Web 8

 Add-TtmCdEnvironment -Id SampleCD -EnvironmentPurpose "Staging" -DiscoveryEndpointUrl http://localhost:8082/discovery.svc 
  -AuthenticationType OAuth -ClientId registration -ClientSecret Reg1str@t10nP@ssw0rd
Add-TtmCdEnvironment : Unable to save item of type 'CdEnvironmentData' with id 'SampleCD'.
One or more errors occurred.
Authorization failed while attempting to communicate with CD Discovery Service 'http://localhost:8082/discovery.svc'. Please 
make sure the proper credentials have been configured in the CD Environment 'SampleCD'.
An error occurred while processing this request.
At line:1 char:1
+ Add-TtmCdEnvironment -Id SampleCD -EnvironmentPurpose "Staging" -DiscoveryEndpoi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Tridion.Topolog...ironmentCommand:AddCdEnvironmentCommand) [Add-TtmCdEnvironment] 
   , DataServiceException
    + FullyQualifiedErrorId : Tridion.TopologyManager.Automation.AddCdEnvironmentCommand

-AuthenticationType : The term '-AuthenticationType' is not recognized as the name of a cmdlet, function, script file, or 
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:2 char:3
+   -AuthenticationType OAuth -ClientId registration -ClientSecret Reg1str@t10nP@s ...
+   ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (-AuthenticationType:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I have checked the Discovery service is working fine, but once i define a Content Delivery environment by running command then getting the above error.

1 Answer 1


You should either make sure you put it all on one line - or use the backtick (`) character to continue the command on the second line. It looks like you pasted the two lines from somewhere and PowerShell intepreted them as two separate commands. The first one then failed because you didn't pass in the right credentials - and the second line failed because it is not a valid command.

P.S. You should use the "cmuser" instead of the "registration" user.

  • @Peter the cmuser you are talking about is any user for CM/DB?
    – Ashutosh
    May 6, 2016 at 10:11
  • No, it's the 'cmuser' oAuth user that is configured by default in Content Delivery. If you've changed it, it should be any user in the 'cm' role. Tridion users and groups are not involved. May 9, 2016 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.