I am trying to deploy a basic/dummy service bus trigger in my function app, but I am getting this error:
3:26:25 PM: Error: This request is not authorized to perform this operation.
I want it to deploy in the function app and I want to check the logs, I have checked the role assigned to me which is the contributor role.
I am trying to deploy a basic/dummy service bus trigger in my function app, but I am getting this error:
3:26:25 PM: Error: This request is not authorized to perform this operation.
I want it to deploy in the function app and I want to check the logs, I have checked the role assigned to me which is the contributor role.
Share Improve this question edited Feb 3 at 1:31 NoXMan 1252 bronze badges asked Jan 31 at 10:15 Reethu MaddiReethu Maddi 1 1- Check grammar and spelling before posting – BanAnanas Commented Jan 31 at 16:52
1 Answer
Reset to default 0If you have enabled managed identity in function App, make sure identity has the necessary permissions such as Azure Service Bus Data Receiver
to access the Service Bus.
Validate Connection String to access the Service Bus.
Ensure your function app has required permissions at the resource group or subscription level.
Make sure Service Bus setup has no access restrictions or network restrictions.
Deploy the function App using the function core tools in command line.
Command to deploy the function to Azure: func azure functionapp publish functionappname
.
I have created a Python Service Bus queue trigger Azure function.
Add ServiceBusConnectionString
with service bus connection string as an application setting under Function App's configuration.
Code:
app = func.FunctionApp()
@app.service_bus_queue_trigger(arg_name="azservicebus", queue_name="queue1",
connection="ServiceBusConnectionString")
def servicebus_trigger(azservicebus: func.ServiceBusMessage):
logging.info('Python ServiceBus Queue trigger processed a message: %s',
azservicebus.get_body().decode('utf-8'))
Deployed function to Azure:
Portal:
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745269483a4619656.html
评论列表(0条)