I have a PowerShell script which is executed as a Process Step and its role is to create teams and link them to the desired project. Last year the script was working correctly, but now it doesn’t work anymore.
I see in your documentation that the teams resource has “ProjectIds” property, which I think is no more valid, because I get error when trying to populate this property and I also downloaded your repository from GitHub, searched for TeamResource and found out that this property is now in ScopedUserRoleResource class…
So, how should I now link the team to a project?
Have a great day!
Thanks for reaching out! You are correct there. A
Team will have a
ScopedUserRole resource related to it that will contain all the scoping info such as the
Is your Powershell script using the
REST API or the
.NET client? I’m asking so I can give you an example that fits your scenario.
@Dalmiro I think it’s using the REST API:
$endpoint = new-object -TypeName Octopus.Client.OctopusClient(New-Object Octopus.Client.OctopusServerEndpoint($OctopusParameters[’$OctopusURI’],$ApiKey))
$endpoint.post("/api/teams/", $newTeam, $null)
Also not sure what’s the second parameter for ($null). I’m repairing it
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.