jan
jan

Reputation: 319

Error creating service connection to azure resource manager : azure pipelines

Azure Resource Manager using managed identity - when trying to add service connection - so I can use another azure cloud app service to deploy to via pipelines.

I am getting this error when trying:

Service connection field 'creationMode' is not expected in Azure Resource Manager connections using the Managed Service Identity authentication scheme. Parameter name: endpoint.Data[creationMode]

I cant seem to figure out what I can do to not get this error.

Anyone received this before. Is it a permission thing?

Any ideas welcomed.

Upvotes: 4

Views: 4831

Answers (2)

Res Riedel
Res Riedel

Reputation: 131

I had the same error in Azure DevOps creating a service Connection to azure.

The reason was, that I first selected "Service principal" and then went back and selected "Managed identity".

When I started from scratch it worked.

Just in case anyone arrives here with that error message.

Upvotes: 12

Mengdi Liang
Mengdi Liang

Reputation: 18958

creationMode is one field used to represent the mode of endpoint creation. It's value is Automatic or Manual.

Not sure why you were getting message which relevant the field creationMode while it is configuring via managed identity. Because it is the one that Service Principal Authentication type used. It is not a expected field for managed identity type.


Troubleshooting way you can use:

Step1:

Use below api to get this issue service connection:

Get https://dev.azure.com/{org name}/{project name}/_apis/serviceendpoint/endpoints/{service endpoint id}?api-version=5.1-preview.2

Step2:

Then check whether creationmode exists in the response body of above api.

Step3:

  • If exists, copy the response body, copy and paste it as request body. Here you are using managed identity to configure your Azure resource manager connection, so remove creationMode field data from the body. And run Put api to update this service connection.

  • Even if it does not exists in that response body, you can also use this Put api to update your service connection with correct data. This can ensure the service connection creation data are correct.

Upvotes: 0

Related Questions