


The attached screenshots summarize the problems encountered when trying to authorize application objects registered in Azure (App Registration) to obtain OAuth2 access codes.
Step 1: Two apps are registered with the WeatherAPI representing the API resource while the WeatherConsumer is the client
Step 2: The intention is for the WeatherConsumer app to obtain an OAuth2 access code from the WeatherAPI app.
Step 3: The relevant section of the WeatherAPI app manifest is as follows:
{
"id": "2fcea6f6-57e4-4fad-925e-9da02053ebb8",
"acceptMappedClaims": null,
"accessTokenAcceptedVersion": 2,
"addIns": [],
"allowPublicClient": null,
"appId": "15260e57-4d7e-4fa9-b33f-33c60d67e8e7",
"appRoles": [
{
"allowedMemberTypes": [
"Application"
],
"description": "Consumer apps shall have access to read only static data for a single weather station.",
"displayName": "ReadSingle",
"id": "0bb031c1-5c54-45d4-a23d-02aaa7dfe8bb",
"isEnabled": true,
"lang": null,
"origin": "Application",
"value": "Weather.ReadSingle"
},
{
"allowedMemberTypes": [
"Application"
],
"description": "Consumer apps have shall accesss to reall all data",
"displayName": "ReadAll",
"id": "3dca5e66-a39a-4c0f-81e4-5b593d39b6d7",
"isEnabled": true,
"lang": null,
"origin": "Application",
"value": "Weather.ReadAll"
}
],
The request I submit to Azure to get the authorization from Azure is as depicted in the Postman screenshot, whereby the client_id and the client_secret are those belonging to the WeatherAPI app. Further, the scope in the request is of the format api://{applicationID}/.default with the {applicationID} replaced with that of the WeatherConsumer app.
I am able to submit the request without any errors as per the screenshot but no authorization code is returned. Any help would be appreciated.







