API resource location is not registered

2019-08-24 21:58发布

i am able to create project/delete/rename everything but when it come for getting group its says "API resource location ebbe6af8-0b91-4c13-8cf1-777c14858188 is not registered on http://khanamar3:8080/tfs/DefaultCollection/" please help.....

public PagedGraphGroups GetAllGroups()
    {
        VssConnection connection = Context.Connection;
        GraphHttpClient graphClient = connection.GetClient<GraphHttpClient>();
        //error coming in next line...
        PagedGraphGroups groups = graphClient.GetGroupsAsync().Result;

        foreach (var group in groups.GraphGroups)
        {
            LogGroup(group);
        }

        return groups;
    }

标签: c# .net tfs
1条回答
相关推荐>>
2楼-- · 2019-08-24 22:22

You could use IIdentityManagementService with ListApplicationGroups to get the list of application groups.

TeamFoundationIdentity[] ListApplicationGroups(
    string scopeId,
    ReadIdentityOptions readOptions
)

Sample code

var applicationGroups = identityManagementService.ListApplicationGroups(projectcollection.Uri.AbsoluteUri, ReadIdentityOptions.None);

Also take a look at this similar question: TFS 2013 get All TFS group including Windows group

查看更多
登录 后发表回答