Sample Header Ad - 728x90

The SELECT permission was denied on the object '__EFMigrationsHistory', database 'master', schema 'dbo'

0 votes
1 answer
1177 views
I'm trying to create asp.net core web api. (https://youtu.be/EmV_IBYIlyo?si=GcPVN7BuautDy6-j&t=1351) At the point where he executes Add-Migration InitialCreate and Update-database my console spits out error: > The SELECT permission was denied on the object > '__EFMigrationsHistory', database 'master', schema 'dbo'. Database is an AzureSQL. It's fresh and new. I use administrator (aka owner) credentials. My question is: How correctly configure user that could execute and have permission to SELECT and INSERT data into __EFMigrationsHistory table. I also tried to follow this document (https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql) , however if I try to do any actions with ALTER SERVER ROLE it says that I don't have permissions. Thank you.
Asked by Lukas Čaplikas (1 rep)
Aug 24, 2023, 10:22 AM
Last activity: May 6, 2025, 05:03 AM