Since October 1st 2022, Web Service Access Key is no longer working and you will need to switch to OAuth. If you are still using Web Service Access Key, the following message is displayed when you login to Business Central.
Even if you already switched to OAuth, you can still get the message. This warning notification will still pop up as long as there is at least one user making a successful basic auth call using web service access keys in the last 24 hours. As soon as there’s no more user doing so, the warning will stop.
Another way to make sure there is no more call is to just remove all the existing web service access keys from all users. Unfortunately, we will need to do this by going to the user card and remove it one by one.
To make it easy, I have developed an app that will do this. The app basically uses the existing RemoveWebServiceAccessKey procedure on User Card. Here is the source code.
page 60011 "Web Service Key Removal_TNG"
{
Caption = 'Web Service Access Key Removal';
PageType = Card;
ApplicationArea = All;
UsageCategory = Administration;
layout
{
area(content)
{
}
}
actions
{
area(Processing)
{
action(RemovaAllExistingWebServiceKey)
{
ApplicationArea = All;
Caption = 'Remove All Keys';
ToolTip = 'Remove all existing web service access keys.';
trigger OnAction()
var
User: Record User;
UserCard: Page "User Card";
RemoveQst: Label 'This will search all users and remove all existing web service access keys. Do you want to continue ?';
RemovedMsg: Label 'All Web Service Access Keys have been removed.';
begin
If not Confirm(RemoveQst, true) then
exit;
User.FindSet();
repeat
UserCard.RemoveWebServiceAccessKey(User."User Security ID");
until User.Next() = 0;
Message(RemovedMsg);
end;
}
}
}
}
After installing the app, search for Web Service Access Key Removal.
Click Remove All Keys.
Click Yes to Confirm.
That’s it. All web service keys from users are removed.
You can get the app release from the GitHub link.
Source Code available on GitHub as well.
The post D365 Business Central : Removing All Web Service Access Keys appeared first on That NAV Guy.
*This post is locked for comments