I'm using the Azure REST API to trigger a pipeline from 2 different function apps. In order to do that I'm using an HttpClient and sending a POST request with a Basic token (username:password) in the Authorization header like the documentation says, with an empty user:
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic",
Convert.ToBase64String(
System.Text.ASCIIEncoding.ASCII.GetBytes(
string.Format("{0}:{1}", "", token))));
From one of the function apps, using the same token/password works fine. However, from the second function app I get an error message:
{"$id":"1","innerException":null,"message":"TF400813: The user {some guid is shown here in the original message} is not authorized to access this resource.","typeName":"Microsoft.TeamFoundation.Framework.Server.UnauthorizedRequestException, Microsoft.TeamFoundation.Framework.Server","typeKey":"UnauthorizedRequestException","errorCode":0,"eventId":3000}
So even that I'm not sending a user, I'm getting an error about a user not being authorized. I checked and the guid is not a client id of an identity related to the function app. I can't even find that guid at all when searching for it in Azure portal.
What could have caused this error if no user is sent to begin with?