Skip to content

Commit

Permalink
fix: fix aad.manifest for da templates (#13047)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yimin-Jin authored Jan 14, 2025
1 parent 06cde6a commit 3c282b9
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 43 deletions.
94 changes: 53 additions & 41 deletions templates/js/api-plugin-from-scratch-oauth/aad.manifest.json.tpl
Original file line number Diff line number Diff line change
@@ -1,9 +1,46 @@
{
"id": "${{AAD_APP_OBJECT_ID}}",
"appId": "${{AAD_APP_CLIENT_ID}}",
"name": "{{appName}}-aad",
"accessTokenAcceptedVersion": 2,
"displayName": "{{appName}}-aad",
"identifierUris": [
{{#MicrosoftEntra}}
"api://${{OPENAPI_SERVER_DOMAIN}}/${{AAD_APP_CLIENT_ID}}",
"${{AADAUTHCODE_APPLICATION_ID_URI}}"
{{/MicrosoftEntra}}
{{^MicrosoftEntra}}
"api://${{AAD_APP_CLIENT_ID}}"
{{/MicrosoftEntra}}
],
"signInAudience": "AzureADMyOrg",
"api": {
"requestedAccessTokenVersion": 2,
"oauth2PermissionScopes": [
{
"adminConsentDescription": "Allows Copilot to read repair records on your behalf.",
"adminConsentDisplayName": "Read repairs",
"id": "${{AAD_APP_ACCESS_AS_USER_PERMISSION_ID}}",
"isEnabled": true,
"type": "User",
"userConsentDescription": "Allows Copilot to read repair records.",
"userConsentDisplayName": "Read repairs",
"value": "repairs_read"
}
{{^MicrosoftEntra}}
]
{{/MicrosoftEntra}}
{{#MicrosoftEntra}}
],
"preAuthorizedApplications": [
{
"appId": "ab3be6b7-f5df-413d-ac2d-abf1e3fd9c0b",
"delegatedPermissionIds": [
"${{AAD_APP_ACCESS_AS_USER_PERMISSION_ID}}"
]
}
]
{{/MicrosoftEntra}}
},
"info": {},
"optionalClaims": {
"idToken": [],
"accessToken": [
Expand All @@ -16,46 +53,21 @@
],
"saml2Token": []
},
"oauth2Permissions": [
{
"adminConsentDescription": "Allows Copilot to read repair records on your behalf.",
"adminConsentDisplayName": "Read repairs",
"id": "${{AAD_APP_ACCESS_AS_USER_PERMISSION_ID}}",
"isEnabled": true,
"type": "User",
"userConsentDescription": "Allows Copilot to read repair records.",
"userConsentDisplayName": "Read repairs",
"value": "repairs_read"
}
],
{{#MicrosoftEntra}}
"preAuthorizedApplications": [
{
"appId": "ab3be6b7-f5df-413d-ac2d-abf1e3fd9c0b",
"permissionIds": [
"${{AAD_APP_ACCESS_AS_USER_PERMISSION_ID}}"
]
}
],
{{/MicrosoftEntra}}
"replyUrlsWithType": [
{
{{#MicrosoftEntra}}
"url": "https://teams.microsoft.com/api/platform/v1.0/oAuthConsentRedirect",
{{/MicrosoftEntra}}
{{^MicrosoftEntra}}
"url": "https://teams.microsoft.com/api/platform/v1.0/oAuthRedirect",
{{/MicrosoftEntra}}
"type": "Web"
}
],
"identifierUris": [
"publicClient": {
"redirectUris": []
},
"web": {
"redirectUris": [
{{#MicrosoftEntra}}
"api://${{OPENAPI_SERVER_DOMAIN}}/${{AAD_APP_CLIENT_ID}}",
"${{AADAUTHCODE_APPLICATION_ID_URI}}"
"https://teams.microsoft.com/api/platform/v1.0/oAuthConsentRedirect"
{{/MicrosoftEntra}}
{{^MicrosoftEntra}}
"api://${{AAD_APP_CLIENT_ID}}"
"https://teams.microsoft.com/api/platform/v1.0/oAuthRedirect"
{{/MicrosoftEntra}}
]
}
],
"implicitGrantSettings": {}
},
"spa": {
"redirectUris": []
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,19 @@
"userConsentDisplayName": "Read repairs",
"value": "repairs_read"
}
],
{{^MicrosoftEntra}}
]
{{/MicrosoftEntra}}
{{#MicrosoftEntra}}
],
"preAuthorizedApplications": [
{
"appId": "ab3be6b7-f5df-413d-ac2d-abf1e3fd9c0b",
"delegatedPermissionIds": [
"${{AAD_APP_ACCESS_AS_USER_PERMISSION_ID}}"
]
}
],
]
{{/MicrosoftEntra}}
},
"info": {},
Expand Down

0 comments on commit 3c282b9

Please sign in to comment.