Getting status code error 403 while deploying the java code to Azure server

Vaibhav Srivastava 0 Reputation points
2024-03-18T12:07:55.8966667+00:00

Getting the below error While deploying java code to azure server.

image1

Status code 403, "{"error":{"code":"AuthorizationFailed","message":"The client 'azure_function@vlsrivaashr.com' with object id '5cdf2ad0-de21-4ec9-be6a-c94dc5a94bb7' does not have authorization to perform action 'Microsoft.Web/serverfarms/read' over scope '/subscriptions/19df830e-81ad-4653-a2a8-a40c3fc83c77/resourceGroups/AZ-CIN-SATYA-FAPP/providers/Microsoft.Web/serverfarms/ASP-AZCINSATYAFAPP-a72f' or the scope is invalid. If access was recently granted, please refresh your credentials."}}"

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
983 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,744 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Achraf Ben Alaya 1,056 Reputation points MVP
    2024-03-21T08:23:40.4866667+00:00

    HI ;

    it's seems that the azure_function@vlsrivaashr.com service account or user dosen't have the necessary permissions to read information about the App Service Plan .

    for that you need to refresh your credentials by logging out and in else , you need to check if you have the right permissions in azure entra .
    If you don't have the necessary permissions you may add them using :

    az role assignment create --assignee "azure_function@vlsrivaashr.com" --role "Reader" --scope "/subscriptions/19df830e-81ad-4653-a2a8-a40c3fc83c77/resourceGroups/AZ-CIN-SATYA-FAPP/providers/Microsoft.Web/serverfarms/ASP-AZCINSATYAFAPP-a72f"
    
    

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.