I have an issue with the Microsoft Graph API.
- I have registered a new app in the Azure portal
 - Added Application.ReadWrite.All and Application.ReadWrite.OwnedBy application permissions
 - Click on the admin consent button
 
After that, I'm trying to get an access token by
POST https://login.microsoftonline.com/12fb9222-8b6e-4006-a483-a87fa44621c3/oauth2/v2.0/token
client_id=dc07d452-9ce1-4b0f-a1a6-4fb5b230a4bb
scope=https://graph.microsoft.com/.default
grant_type=client_credentials
client_secret={client_secret}
And I'm getting the token. Token looks like that:
{
  "aud": "https://graph.microsoft.com",
  "iss": "https://sts.windows.net/12fb9222-8b6e-4006-a483-a87fa44621c3/",
  "iat": 1570007742,
  "nbf": 1570007742,
  "exp": 1570011642,
  "aio": "42VgYHi/n737QYBx8DrOTW5Ft0skAQ==",
  "app_displayname": "testapp",
  "appid": "dc07d452-9ce1-4b0f-a1a6-4fb5b230a4bb",
  "appidacr": "1",
  "idp": "https://sts.windows.net/12fb9222-8b6e-4006-a483-a87fa44621c3/",
  "oid": "24d9cd08-efaf-497b-b023-920cc208400a",
  "roles": [
    "Application.ReadWrite.OwnedBy",
    "Application.ReadWrite.All",
  ],
  "sub": "24d9cd08-efaf-497b-b023-920cc208400a",
  "tid": "12fb9222-8b6e-4006-a483-a87fa44621c3",
  "uti": "f38JDx5iw0Kkp16mnZIqAA",
  "ver": "1.0",
  "xms_tcdt": 1569224302
}
After that, I'm executing
GET https://graph.microsoft.com/beta/applications/bb4c22ea-632e-45d8-ad0f-2ba39cf399c1
And I'm getting app properties.
And finally I want to update my app properties and I'm trying execute
PATCH https://graph.microsoft.com/beta/applications/bb4c22ea-632e-45d8-ad0f-2ba39cf399c1
{
    "displayName": "displayName"
}
And I'm getting:
{
  "error": {
    "code": "Authorization_RequestDenied",
    "message": "Insufficient privileges to complete the operation.",
    "innerError": {
      "request-id": "1565bb72-8392-4ca7-bb20-02b40f5603bd",
      "date": "2019-10-02T09:23:57"
    }
  }
}
I'm confused. I have permissions for the API update application, but I got the error, please help.
