microsoft-identity-web
microsoft-identity-web copied to clipboard
ASP.net Core Quickstart AppPermissions/Scopes properties not used
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.