arcade icon indicating copy to clipboard operation
arcade copied to clipboard

Somes users cannot use Helix artifacts tab

Open ChadNedzlek opened this issue 3 years ago • 1 comments

I've been looking at helping V-WEXU, who is unable to access our service.

When I trace through the logs, we are trying to make this call: https://vssps.dev.azure.com/dnceng/_apis/graph/descriptors/d32a9dfa-d10f-421d-aecd-786ddf108789?api-version=5.0-preview.1, and it's returning 404, even though it definitely, definitely should not. The user in question is logged in and present in AzDO, so they should be returning a user.

ChadNedzlek avatar Sep 23 '22 18:09 ChadNedzlek

@mmitche or @MattGal: I vaguely recall something about users "not existing" in AzDO and needed to be added... somewhere... could this be an example of that? Do we need to add this persons identity somewhere?

ChadNedzlek avatar Sep 23 '22 18:09 ChadNedzlek

I dunno...if they are internal msft, then it's possible we needed to add them to the dnceng-public Readers group?

mmitche avatar Sep 26 '22 15:09 mmitche

It's on internal (public is totally anonymous). If it doesn't sound like something familiar, I'll open an IcM to figure out why she's getting "not found".

ChadNedzlek avatar Sep 26 '22 16:09 ChadNedzlek

Created https://portal.microsofticm.com/imp/v3/incidents/details/337671713

ChadNedzlek avatar Sep 26 '22 21:09 ChadNedzlek

I dunno...if they are internal msft, then it's possible we needed to add them to the dnceng-public Readers group?

I don't see an update here, did you try adding them directly to the internal project? It wouldn't be dnceng-public though.

MattGal avatar Sep 27 '22 15:09 MattGal

Is that a thing we need to do? I'm happy to try whatever might work, it's just odd she can view the all the information in internal... implying she's got some sort of user information... but it's only our extension that isn't working.

I didn't want to just create a bunch of noise in the project unnecessarily.

ChadNedzlek avatar Sep 27 '22 19:09 ChadNedzlek

I also don't actually know how to "add a user"... There are no buttons on the user page.

ChadNedzlek avatar Sep 27 '22 19:09 ChadNedzlek

The IcM has resolved, apparently there is some extra code we need to do that we are getting lucky most of the time:

If you want to convert the deployment level to the organization level you can make use of the Graph API. Read the bit about Storage Keys and Descriptors in the description. And then you can make use of the specific apis as follows:

Resolve the storage key (deployment level id) to a descriptor (notice there is no organization specified here) https://vssps.dev.azure.com/_apis/Graph/descriptors/ (e.g. https://vssps.dev.azure.com/_apis/Graph/descriptors/bbb0c9c1-704c-41a9-81fe-072f8da6f9ac)

You need to save the value "aad.*** " (the descriptor) and then use it in a call including the organization name you want to resolve to the organization level Storage Key: https://vssps.dev.azure.com/{organization}/_apis/Graph/StorageKeys/aad.**** and now you have the value of the organization level id returned which you can use for your request.

ChadNedzlek avatar Oct 06 '22 20:10 ChadNedzlek

I'm going to unassign this and pop it back on the backlog, since it looks like we have a little work to do. It shouldn't be too hard to add these couple extra calls to the controller, I hope.

ChadNedzlek avatar Oct 06 '22 20:10 ChadNedzlek

/FYI @ilyas1974 back for assignment.

ChadNedzlek avatar Oct 06 '22 20:10 ChadNedzlek

Darn it, the workaround doesn't work, because I can't create a PAT that has "deployment level" access. I reactivated the IcM.

ChadNedzlek avatar Oct 10 '22 21:10 ChadNedzlek

Moving to tracking. No response on the IcM yet.

missymessa avatar Oct 12 '22 18:10 missymessa

@ChadNedzlek AzDO got back to us with this feedback: "they recomend you use PAT for your extension and for this particular API this PAT should have 'vso.Graph' scope."

Let me know if this is what we're already doing so I can follow up with them about it.

missymessa avatar Oct 20 '22 16:10 missymessa

I... don't know what that means. I have no idea how to specify a scope, or get the PAT for an extension. @alexperovich doesn't either.

ChadNedzlek avatar Oct 20 '22 20:10 ChadNedzlek

I replied to AzDO asking for guidance on how to specify scope for the PAT and how to get a PAT for that extension. (I recall you mentioning that there is a lack of documentation in this space.)

missymessa avatar Oct 20 '22 20:10 missymessa

@ChadNedzlek can you pick this up again? I looked at the attached ICM and it appears to have been closed.

ilyas1974 avatar Nov 17 '22 15:11 ilyas1974

As we have not heard anything about this issue for several months, I am going to close it. If this is still a problem, please re-open it.

ilyas1974 avatar Feb 01 '23 20:02 ilyas1974