Error:
You are not
authorized to login with your current credentials. You will be redirected to
the login page in a few seconds.
Reason:
Database
restored into developer environment from another environment.
Solution:
Case 1:
If you have credentials
of the user, who was the Admin in the environment from where database is
restored - Use it!
Case 2:
If
environment is locally hosted, we don't have credentials, we can use
"Admin provisioning tool" to provision Admin user again. shortcut of
this application is available in desktop otherwise you can find it from
Check
K:\AosService\PackagesLocalDirectory\Bin
Case 3:
If the
environment is Microsoft hosted, we will not be able to run “AdminUserProvisioning”
tool and face error as below.
Here we have
access of SQL database, so we can use query below to update Admin account.
Note: Value used in update query below,
you can find from another database in your environment.
UPDATE U
SET U.NETWORKALIAS = 'MThacker@abc.com',
U.NETWORKDOMAIN = 'https://sts.windows.net/',
U.SID = 'S-1-19-1410091826-xxxx-4079435192',
IDENTITYPROVIDER = 'https://sts.windows.net/',
OBJECTID = '25E55EE6-AB98-xxxxxxxx-FE00ACD05DBB'
-- Enable = 1
FROM UserInfo U WHERE U.Id LIKE 'Admin'
For case 3,
after using query above, I was able to login to FO environment but still i am not
sure this single query is enough?!
Let me know, if you have any other experience
with this!