microsoft-identity-web icon indicating copy to clipboard operation
microsoft-identity-web copied to clipboard

ASP.net Core Quickstart AppPermissions/Scopes properties not used

Open acu-kevinb opened this issue 9 months ago • 0 comments

Documentation related to component

Microsoft identity platform tutorials

Please check all that apply

  • [ ] typo
  • [ ] documentation doesn't exist
  • [x] documentation needs clarification
  • [x] error(s) in the example
  • [ ] needs an example

Description of the issue

The microsoft identity platform tutorial here: https://learn.microsoft.com/en-us/entra/identity-platform/tutorial-web-api-dotnet-core-build-app?tabs=workforce-tenant#add-app-role-and-scope

requests that the user set the following into appsettings.json:

{
  "AzureAd": {
    "Instance": "Enter_the_Authority_URL_Here",
    "TenantId": "Enter_the_Tenant_Id_Here",
    "ClientId": "Enter_the_Application_Id_Here",
    "Scopes": {
      "Read": "Forecast.Read",
    },
    "AppPermissions": {
      "Read": ["Forecast.Read"],
    }
  },
  "Logging": {...},
  "AllowedHosts": "*"
}

The issue is that neither of the 'Scopes' or 'AppPermissions' blocks appears to be used in the tutorial. I'm assuming that this step is a holdover from an older version where RequiredScopeOrAppPermissionAttribute was being used on a controller, in which case having Scopes appear to be a delimited string while AppPermissions is an array is also confusing.

acu-kevinb avatar Mar 24 '25 21:03 acu-kevinb