Are visualStudioOnline ServiceHooks available for on-premise TFS instances? - tfs

I would like to subscribe events from our on-premise TFS instance.
But when querying for the available publishers, I get a "ServiceHooksFeatureFlagNotEnabled" exception..
// http://tfs/DefaultCollection/_apis/hooks/publishers?api-version=1.0
{
"$id": "1",
"innerException": null,
"message": "Error in the application.",
"typeName": "Microsoft.VisualStudio.Services.ServiceHooks.Publishers.Server.ServiceHooksPublisherControllerBase+ServiceHooksFeatureFlagNotEnabledException, Microsoft.VisualStudio.Services.ServiceHooks.Publishers.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
"typeKey": "ServiceHooksFeatureFlagNotEnabledException",
"errorCode": 0,
"eventId": 4501
}
Is this an imposed limitation for on-premise instances? Or this is an optional feature, that must be expressely enabled?
Our server ships a TFS2013.4.

Unfortunately the answer is no. This is coming in TFS 2015 if the current plans have not changed in the mean time.

Related

accessing Priority form via REST API returns 404 form not ready

I did all configuration need as I read on priority SDK portal and other StackOverflow resources to use rest api:
Installed License.
created api user name.
in forms for api/limited license I pulled the releveant forms and checked the API coulmn.
Yet I get:
{
"error": {
"code": "400",
"message": "מסך DOCUMENTS_p אינו מוכן.",
"target": "",
"details": {},
"innererror": {}
}
}
What else needs to be done in priority for this to work.
I read in some answer to restrt IIS but that didn't work either.
Sami
This is a Priority side error.
The form in Priority is malfunctioning and not compiled. The Priority implementer / programmer should run the Prepare Form on this DOCUMENTS_p, and see if it completes or has errors.

DevOps migrate prepare fails after 'user not found' graph call

I am trying to migrate on-premise TFS (DevOps Server 2019 update 1.1) to DevOps Services and using the migrate tool. I have run the validate command and cleaned up those warnings but the next command (prepare) fails mysteriously. The log file simply says:
[Error #11:18:19.488]
Exception Message: Request failed (type AadGraphTimeoutException)
Exception Stack Trace: at Microsoft.VisualStudio.Services.Identity.DataImport.AadIdentityMapper.ExecuteGraphRequest[T](Func`1 request)
at Microsoft.VisualStudio.Services.Identity.DataImport.AadIdentityMapper.GetAadTenantId()
at TfsMigrator.TfsMigratorCommandValidate.PopulateDataImportPropertiesOnContext()
at TfsMigrator.TfsMigratorCommandValidate.PopulateValidationItems(DataImportValidationContext context)
at TfsMigrator.TfsMigratorCommandValidate.RunValidations(Boolean validateFiles)
at TfsMigrator.TfsMigratorCommandPrepare.RunImpl()
at TfsMigrator.TfsMigratorCommand.Run()
A colleague pointed out this troubleshooting from the docs but a) we have about 10 users involved in TFS (~50 total active in local AD) so it is hard to believe we have so many users it would time out, and b) I ran the Get-MsolUser troubleshooting commands and successfully queried AAD via Graph.
I ran the prepare command again with Fiddler Classic connected as a proxy and discovered a failing call to the Graph API. It looked like
Request (simplified headers):
POST https://graph.windows.net/xxxxxxxx-xxxx-xxxx-xxxx-0664e34adcbd/$batch?api-version=1.6 HTTP/1.1
Content-Type: multipart/mixed; boundary=batch_ea471df4-db73-403d-a172-a0955ddb1575
...
--batch_ea471df4-db73-403d-a172-a0955ddb1575
GET https://graph.windows.net/xxxxxxxx-xxxx-xxxx-xxxx-0664e34adcbd/tenantDetails?api-version=1.6 HTTP/1.1
...
--batch_ea471df4-db73-403d-a172-a0955ddb1575--
Response (body):
{
"odata.error": {
"code": "Authentication_Unauthorized",
"message": {
"lang": "en",
"value": "User was not found."
},
"requestId": "58c4cabc-dd67-4ce8-9735-134a7e0df60c",
"date": "2020-09-14T20:07:49"
}
}
So my question at this point is - Are there any permissions (DevOps, Azure, Graph) that are missing? Are there any work arounds available? I did tag this question with Microsoft Graph API but do believe the failing call uses the older Azure AD Graph API.

Using filter on /me/joinedTeams not working

I'm implementing a search for a user's joined Teams unsing Microsoft Graph. The idea is to make a call to /beta/me/joinedTeams and use a ?$filter=startswith(description,'searchterm') filter.
So for example when I try the request https://graph.microsoft.com/beta/me/joinedTeams?$filter=startswith(description,'Business') in the Microsoft Graph Explorer it ignores the filter and I get these results:
{
"#odata.context": "https://graph.microsoft.com/beta/$metadata#groups",
"value": [
{
"id": "02bd9fd6-8f93-4758-87c3-1fb73740a315",
"displayName": "HR Taskforce",
"description": "Welcome to the HR Taskforce team.",
"isArchived": false
},
{
"id": "13be6971-79db-4f33-9d41-b25589ca25af",
"displayName": "Business Development",
"description": "Welcome to the BizDev team.",
"isArchived": false
},
{
"id": "8090c93e-ba7c-433e-9f39-08c7ba07c0b3",
"displayName": "X1050 Launch Team",
"description": "Welcome to the team that we've assembled to launch our product.",
"isArchived": false
}
]
}
Am I doing something wrong with my request?
Your request is right, but the joinedTeams does not support filtering or ordering results. So although we pass the filter/orderby parameter, when Microsoft Graph sees a query parameter it doesn't expect, it simply ignores the unknown filter/orderby parameter and returns an unfiltered/default-sorted result.
I have tried the api with odata query parameters for trial O365 account and real account.
https://developer.microsoft.com/en-us/graph/docs/concepts/query_parameters
Not all parameters are supported across all Microsoft Graph APIs, and
support might differ significantly between the v1.0 and beta
endpoints.
The only suggestion for you is to vote up the existing feature request in User Voice or submit a new one.
Thanks for pointing this out. As Seiya points out, /me/joinedTeams does not support the OData query parameters. The documentation suggested otherwise, I've made a doc fix that should propagate in the next day or two.

Support for Assigning User Licenses in Microsoft Graph API?

When will support for assigning user licenses in O365 be added for the Microsoft Graph API? Currently in version 1.0, I get the following error when trying to assign a license,
{
"error": {
"code": "Request_BadRequest",
"message": "Property 'assignedLicenses' is read-only and cannot be set.",
"innerError": {
"request-id": "0827887a-4e46-48d6-93c6-81825aeaac61",
"date": "2017-06-16T18:35:29"
}
}
}
Will this be supported in version 2.0? If so, is there a timeframe it will be added?
Assigning licenses is supported, but not through updating the property. This property is indeed read only. We should improve our error message here to indicate how this can be set - sorry about that.
What you need to do is use the assignLicense method. The info is here: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_assignlicense. Please let me know if you have any further challenges using this method.
Hope this helps,

TFS: PublisherNotFoundException when trying to create a subscription for "rm"

On-premises TFS 2015 u2. I want to create an HTTP service hook subscription for a release creation event. As directed here and here, I'm sending a POST request to
http://tfs.mycompany.com:8080/tfs/MyCollection/_apis/hooks/subscriptions?api-version=1.0
with the following JSON:
{
"publisherId": "rm",
"eventType": "ms.vss-release.release-created-event",
"resourceVersion": "1.0-preview.1",
"consumerId": "webHooks",
"consumerActionId": "httpRequest",
"publisherInputs":
{
"projectId": "aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
},
"consumerInputs":
{
"url": "http://someserver/somefolder/"
}
}
I get back the following error message:
{
"innerException": null,
"message": "No publisher could be found with id \"rm\".",
"typeName": "Microsoft.VisualStudio.Services.ServiceHooks.WebApi.PublisherNotFoundException, Microsoft.VisualStudio.Services.ServiceHooks.WebApi, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
"typeKey": "PublisherNotFoundException",
"errorCode": 0,
"eventId": 4501
}
And indeed, if you request a list of publishers, there's only one, with ID "tfs". There's no "rm" publisher there. Requesting the same subscription from the "tfs" publisher yields an "unknown event" error.
Do I have to enable that publisher somehow? Is it supported in on-prem TFS? If so, since which version?
Would it hurt Microsoft to annotate their TFS REST API docs with supported versions, like the rest of their API docs do?
A publisher is a service that publishes events to service hooks. In TFS 2015 update2, if you request a list of publishers, you will not get publish ID with "rm". It's not support for TFS2015 for now.
Moreover, actually the resource version for rm should be 3.0
"resourceVersion": "3.0-preview.1",

Resources