0

I have a .NET project which requires administrator permissions to run. I have converted it to Azure Function App consisting of multiple functions and running it in Azure. It seems like it is not running as administrator because I am getting the error that:

The application must run as Administrator.

I am actually trying to get data from an API using a Http Request but which requires Admin permissions as shown here:

"identities": [
{
   "type": "WebJobsAuthLevel",
   "level": "Admin"
}
]

Is there a way to provide admin rights to Azure Function app?

Thanks.

moirK
  • 651
  • 3
  • 11
  • 34
  • 2
    Perhaps it would help to kow why it needs administrator privileges. I seriously doubt MS would allow code to run as administator on their infrastructure, seems like an unnecessary security risk to me. – phuzi Oct 28 '19 at 11:27

1 Answers1

2

There is no such thing as an administrator role in Azure App Service. You do not have this kind of access on top of the VM that is running your code. I suspect that the code you are trying to run in your Azure Function isn't cloud compatible and will not run as is.

John Leidegren
  • 59,920
  • 20
  • 131
  • 152
  • Thank you, @John. I am currently running Visual Studio in administrator mode to be able to run my code as administrator but that doesn't seem to be enough since I still get the error. Is there anything else I should try? – moirK Oct 28 '19 at 11:37
  • 1
    @zimmer Try to figure out why the application is throwing this error `"The application must run as Administrator"` Why does it think it needs this permission level? How is it detecting this? Is it simply detecting it in an incompatible way or does it actually need admin access rights to do something which can be done without admin access rights? – John Leidegren Oct 28 '19 at 13:35