Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Service Connection Authorization cannot be null #77

Open
riverar opened this issue Oct 18, 2019 · 10 comments
Open

Error: Service Connection Authorization cannot be null #77

riverar opened this issue Oct 18, 2019 · 10 comments

Comments

@riverar
Copy link

riverar commented Oct 18, 2019

After completing the Add Windows Dev Center [sic] service connection in Azure Dev Ops, I'm presented with the unhelpful error: Error: Service Connection Authorization cannot be null

Fiddler shows:

{
  "$id": "1",
  "innerException": null,
  "message": "Service Connection Authorization cannot be null.",
  "typeName": "Microsoft.VisualStudio.Services.ServiceEndpoints.WebApi.ServiceEndpointException, Microsoft.VisualStudio.Services.ServiceEndpoints.WebApi",
  "typeKey": "ServiceEndpointException",
  "errorCode": 0,
  "eventId": 3000
}

Related: #76

@rickjansen-dev
Copy link

I'm facing the same issue. My old configuration is not working anymore since the client secret expired.
I created a new client secret, but now it's impossible to save since clicking Close in the window doesn't actually save and clicking OK throws this error.

Also, I find it quite a bit alarming to see that the windows dev center is not listed in the common service connections in the docs:

https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml#common-service-connection-types

@ggretz
Copy link

ggretz commented Nov 8, 2019

Same problem here :( The client secret expired and we are not able to create / update the secret because of the same error message

@riverar
Copy link
Author

riverar commented Nov 8, 2019

I contacted support on this issue and long story short: this extension is dead. There's a v2 in the works but it's not available for use. I had to switch to StoreBroker (https://github.com/microsoft/StoreBroker).

@louis-wuitton
Copy link
Member

Hi folks, so the issue is related to the interface that creates the service endpoint. There is a change in interface on VSTS and as a result we could not create the endpoint successfully.

@louis-wuitton
Copy link
Member

Hi folks, I discovered that the issue could be fixed by using a different type of endpoint for the extension. Previously the extension was using principal type endpoint. I switched it to basic and it helped me unblocked the issue. I uploaded the extension with the fix and it could authenticate for me successfully. You should be unblocked with the service endpoint issue now. When you create an endpoint the interface should look like this:

service_endpoint

@riverar
Copy link
Author

riverar commented Nov 13, 2019

@louis-wuitton Can confirm configuration works now. Ping @ggretz @vuurbeving.

@ChristopheLav
Copy link

ChristopheLav commented Nov 14, 2019

@louis-wuitton

This breaks the extension for current users...
I have delete and recreate the Service Connection, in one or two hours I can confirm if it's work again (update: working).

For this type of change, a warning in the changelog would be better + a version bump would be appreciate to allow existings users to use the previous version without breaking their pipelines.

😐

@rickjansen-dev
Copy link

It's working for me too, thanks 👍

I did create a new service connection though. I wasn't able to edit the old one (click on 'Update service connection' and nothing happens). So i guess @ChristopheLav has a valid point here regarding users with existing connections (and non-expired credentials). But it would break sooner or later anyway once the client secret expires...

@chadsowald
Copy link

Also ran into this exact issue with a service connection tied to an app registration that had expired credentials. I also ended up creating a new one and am unblocked. Glad I found this thread and didn't waste too much time trying to get the broken one to save/update.

@damienpontifex
Copy link

I came across this today and noticed this in the payload
image
I copied the request from the browser to curl and removed the null apiToken and renamed the property apitoken to apiToken and it worked.
So maybe something with the Azure DevOps GUI / JS request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants