From a90318398a720ce7234ff49def41033ff122da11 Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Tue, 21 May 2024 12:58:13 +0100 Subject: [PATCH] Add extra message for 401 when pat token is not full access. --- .../_Enginev1/Clients/TfsMigrationClient.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/MigrationTools.Clients.AzureDevops.ObjectModel/_Enginev1/Clients/TfsMigrationClient.cs b/src/MigrationTools.Clients.AzureDevops.ObjectModel/_Enginev1/Clients/TfsMigrationClient.cs index 07a8fd135..bb07c64ef 100644 --- a/src/MigrationTools.Clients.AzureDevops.ObjectModel/_Enginev1/Clients/TfsMigrationClient.cs +++ b/src/MigrationTools.Clients.AzureDevops.ObjectModel/_Enginev1/Clients/TfsMigrationClient.cs @@ -166,7 +166,15 @@ private TfsTeamProjectCollection GetDependantTfsCollection(NetworkCredential cre new Dictionary { { "Time",timer.ElapsedMilliseconds } }); - Log.Error(ex, "Unable to configure store: Check persmissions and credentials for {AuthenticationMode}", _config.AuthenticationMode); + Log.Error(ex, "Unable to configure store: Check persmissions and credentials for {AuthenticationMode}!", _config.AuthenticationMode); + switch (_config.AuthenticationMode) + { + case AuthenticationMode.AccessToken: + Log.Error("The PAT MUST be 'full access' for it to work with the Object Model API."); + break; + default: + break; + } Environment.Exit(-1); } return y;