The match is a rematch of last year's friendly in Norway, which ended 2-0 to Aberdeen with goals from Jordon Brown and Cammy Smith.
The game, now named The Energy Cities Challenge Cup, will take place at Pittodrie on Wednesday, 4th September this year - during the Offshore Europe Exhibition.
AFC's vice-chairman George Yule told RedWeb: "We decided to make this an open-doors game for the greater benefit for the local community of Aberdeen City and Shire while we will also release our corporate hospitality facilities and commercial sponsorship packages to the energy business communities in Aberdeen and Stavanger, which of course is one of our twin cities.
"This will be the second year in a row that we've played Viking and both clubs are very keen to see the Energy Cities Challenge Cup become a regular fixture on the calendar with the possibility that it could be expanded in the future to incorporate other energy hubs such as Houston.
"From a football perspective, these types of games are excellent, particularly for our younger players whose experience against foreign opposition is limited."
Source: Aberdeen Mad