The match will take place on Wednesday, September 4, and comes after the eight-time Norwegian champions hosted the Reds at their Viking Stadion last year.
The fixture has been lined-up as part of the biannual Offshore Europe event being held in the city and is being billed as The Energy Cities Challenge Cup.
Fans will be able to see the game for free after Aberdeen bosses decided to waive entry fees.
Aberdeen vice-chairman George Yule said: "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.
"The last Offshore Europe conference and exhibition in 2011 attracted more than 32,000 visitors to the event and many of the fifteen hundred exhibitors enjoy strong links in both Scotland and Norway.
"Consequently, I'm certain there will be a substantial demand for those wishing to attend the match with guests and or staff visiting the show during that week.
"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."