SSAS Deployment Error - OLE DB error: OLE DB or ODBC error: Login failed for user 'NT SERVICE\NetworkService'.; 28000.

Problem:

When I try to deploy a cube in BIDS today, I get the following error:

OLE DB error: OLE DB or ODBC error: Login failed for user 'NT SERVICE\NetworkService'.; 28000.

Reason:

Because I have used NT SERVICE\NetworkService as the service account for both the SQL Server service and the SSAS Service, and I have chosen the "Service Account" on the impersonation page for the data source. Although 'Test Connection works fine", the NT SERVICE\NetworkService account does not have the permission to access the database by default.

Solution:

Option 1 - Change the service account to Local System
Option 2 - Do not use the service account, use another account with access permission on the underlying database
Option 3 - Give the NT SERVICE\NetworkService account a permission to access to the database. see this post for details.