How do I add a scope in AD B2C App Registration using AZ CLI

Viewed 59

I am trying to create an app registration in Azure AD B2C. I need to add a scope using Azure CLI (which can be added by going to Expose a API blade in portal)

I can retrieve my app using

az rest --method GET --uri https://graph.microsoft.com/v1.0/applications/id

enter image description here

But when I run the following command

az ad app update --id 'id' --set api.oauth2PermissionScopes=@scopes.json

I get this error Couldn't find 'api' in ''. Available options: []

Here is the scopes.json file

{
    "api": {
      "oauth2PermissionScopes": [
        {
          "type": "User",
          "isEnabled": true,
          "adminConsentDisplayName": "deafult",
          "adminConsentDescription": "deafult",
          "id": "73a43c0e-9a5e-4646-9d1e-c56a43279f99",
          "value": "deafult",
          "userConsentDisplayName": "deafult",
          "userConsentDescription": "deafult"
        }
      ]
    }
}

Any suggestions would be much appreciated

0 Answers
Related