'VS860016: Could not find subject in the backing domain. This value came from the parameter 'originId'

I'm working with the Azure DevOps API and Microsoft Graph API. This is the issue:

I create an AAD (azure active directory) group, then, I create a new ADO (AzureDevOps) project in a XXX organization. Once the project is created I add the AAD group created at the beginning into the ADO project groups.

enter image description here

It works fine, but sometimes I get an error when I try to add the AAD group into the project permissions groups (the image above), the error is the same as the title: "VS860016: Could not find subject in the backing domain. This value came from the parameter 'originId'."

The first solution was creating a retry function, but it doesn't ever work, so, I'm trying to figure out was is the best approach to resolve the problem, I tried to find some information about this error, but not exists info regarding this.

Do you know the reason for the issue? Creating a queue for this could work, but I'm looking for a workaround.



Solution 1:[1]

Tested in my Environment able to add the AAD group into the project permissions groups.

enter image description here

enter image description here

Not Sure why you are getting the error, Even there is no document to troubleshoot for this Error. Would Suggest you please reach out to Azure Support Team for Solution and Root Cause.

Solution 2:[2]

According to this report, AzureDevops_group create may fail due to AAD replication issues/delay.

It is blocked by UnmarshalCollectionBody does not return all errors, but it has been fixed. You can refer to https://github.com/microsoft/azure-devops-go-api/pull/48.

It leads to the the Azure DevOps GO API which utilizes the HashiCorp retryable HTTP client as transport backend for the DevOps API.

You can try to use custom HTTP client with requests to Azure Devops which you can find in https://github.com/microsoft/azure-devops-go-api/issues/52.

We are still working on support for options for default client and git client, and now it is possible to use it according to https://github.com/microsoft/azure-devops-go-api/pull/78.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 RahulKumarShaw-MT
Solution 2 Kangcheng Jin-MSFT