Hi all, newbie here!
I am trying to configure serverless with azure (I know AWS but not Azure) following the instructions of Serverless Framework - Azure Functions Guide - Quick Start and I get some permission errors (see below). Do you have any idea of what I may be doing wrong?
Thanks!!!
az login # this opens a browser window, where I can login with no issues
[
{
"cloudName": "AzureCloud",
"homeTenantId": "8cf3ba61-43c6-4ec1-885a-AAAAAAAAA",
"id": "17ea22dc-be7d-4e76-b562-BBBBBBBBBB",
"isDefault": true,
"managedByTenants": [],
"name": "Azure subscription 1",
"state": "Enabled",
"tenantId": "8cf3ba61-43c6-4ec1-885a-AAAAAAAAA",
"user": {
"name": "info@CCCCCCCCCCCCCCC",
"type": "user"
}
}
]
az ad sp create-for-rbac --name serverless_azure
{
"appId": "e2ba8b36-354d-4a28-b377-DDDDDDDDD",
"displayName": "serverless_azure",
"password": "7~iY3z2-EEEEEEEEEEEEEEEEEEEEEEEEEEEE",
"tenant": "8cf3ba61-43c6-4ec1-885a-AAAAAAAAA"
}
export AZURE_SUBSCRIPTION_ID='17ea22dc-be7d-4e76-b562-BBBBBBBBBB'
export AZURE_TENANT_ID='8cf3ba61-43c6-4ec1-885a-AAAAAAAAA'
export AZURE_CLIENT_ID='e2ba8b36-354d-4a28-b377-DDDDDDDDD'
export AZURE_CLIENT_SECRET='7~iY3z2-EEEEEEEEEEEEEEEEEEEEEEEEEEEE'
serverless deploy
Error: The client '04cb0ae7-fd56-4998-bf0e-FFFFFFFFFFFFF' with object id '04cb0ae7-fd56-4998-bf0e-FFFFFFFFFFFFF' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/write' over scope '/subscriptions/17ea22dc-be7d-4e76-b562-BBBBBBBBBB/resourcegroups/sls-weur-dev-serverless-azure-rg' or the scope is invalid. If access was recently granted, please refresh your credentials.