|
| 1 | +{ |
| 2 | + "Sample": { |
| 3 | + "Title": "A WPF application that calls a Web API running on ASP.NET Core 2.0 protected by Azure AD using OAuth 2.0 access tokens. ", |
| 4 | + "Level": 200, |
| 5 | + "Client": ".NET Desktop (WPF)", |
| 6 | + "Service": "ASP.NET Core Web API", |
| 7 | + "RepositoryUrl": "active-directory-dotnet-native-aspnetcore-v2", |
| 8 | + "Endpoint": "AAD v2.0" |
| 9 | + }, |
| 10 | + |
| 11 | + /* |
| 12 | + This section describes the Azure AD Applications to configure, and their dependencies |
| 13 | + */ |
| 14 | + "AADApps": [ |
| 15 | + { |
| 16 | + "Id": "service", |
| 17 | + "Name": "TodoListService (active-directory-dotnet-native-aspnetcore-v2)", |
| 18 | + "Kind": "WebApi", |
| 19 | + "HomePage": "https://localhost:44351/", |
| 20 | + "PasswordCredentials": "Auto", |
| 21 | + "RequiredResourcesAccess": [ |
| 22 | + { |
| 23 | + "Resource": "Microsoft Graph", |
| 24 | + "DelegatedPermissions": [ "User.Read" ] |
| 25 | + } |
| 26 | + ], |
| 27 | + "ManualSteps": [ |
| 28 | + { |
| 29 | + "Comment": "Navigate to the Manifest page and change 'signInAudience' to 'AzureADandPersonalMicrosoftAccount'." |
| 30 | + }, |
| 31 | + { |
| 32 | + "Comment": "[Optional] If you are a tenant admin, you can navigate to the API Permisions page and select 'Grant admin consent for (your tenant)'" |
| 33 | + } |
| 34 | + ] |
| 35 | + }, |
| 36 | + { |
| 37 | + "Id": "client", |
| 38 | + "Name": "TodoListClient (active-directory-dotnet-native-aspnetcore-v2)", |
| 39 | + "Kind": "Desktop", |
| 40 | + "RequiredResourcesAccess": [ |
| 41 | + { |
| 42 | + "Resource": "service", |
| 43 | + "DelegatedPermissions": [ "user_impersonation" ] |
| 44 | + } |
| 45 | + ], |
| 46 | + "ManualSteps": [ |
| 47 | + { |
| 48 | + "Comment": "Navigate to the Manifest page and change 'signInAudience' to 'AzureADandPersonalMicrosoftAccount'." |
| 49 | + } |
| 50 | + ] |
| 51 | + } |
| 52 | + ], |
| 53 | + |
| 54 | + /* |
| 55 | + This section describes how to update the code in configuration files from the apps coordinates, once the apps |
| 56 | + are created in Azure AD. |
| 57 | + Each section describes a configuration file, for one of the apps, it's type (XML, JSon, plain text), its location |
| 58 | + with respect to the root of the sample, and the mappping (which string in the config file is mapped to which value |
| 59 | + */ |
| 60 | + "CodeConfiguration": [ |
| 61 | + { |
| 62 | + "App": "service", |
| 63 | + "SettingKind": "Text", |
| 64 | + "SettingFile": "\\..\\TodoListService\\appsettings.json", |
| 65 | + "Mappings": [ |
| 66 | + { |
| 67 | + "key": "Domain", |
| 68 | + "value": "$tenantName" |
| 69 | + }, |
| 70 | + { |
| 71 | + "key": "TenantId", |
| 72 | + "value": "$tenantId" |
| 73 | + }, |
| 74 | + { |
| 75 | + "key": "ClientId", |
| 76 | + "value": "service.AppId" |
| 77 | + }, |
| 78 | + { |
| 79 | + "key": "ClientSecret", |
| 80 | + "value": "service.AppKey" |
| 81 | + } |
| 82 | + ] |
| 83 | + }, |
| 84 | + |
| 85 | + { |
| 86 | + "App": "client", |
| 87 | + "SettingKind": "XML", |
| 88 | + "SettingFile": "\\..\\TodoListClient\\App.Config", |
| 89 | + "Mappings": [ |
| 90 | + //{ |
| 91 | + // "key": "ida:Tenant", |
| 92 | + // "value": "$tenantName" |
| 93 | + //}, |
| 94 | + { |
| 95 | + "key": "ida:ClientId", |
| 96 | + "value": ".AppId" |
| 97 | + }, |
| 98 | + { |
| 99 | + "key": "todo:TodoListScope", |
| 100 | + "value": "service.Scope" |
| 101 | + }, |
| 102 | + { |
| 103 | + "key": "todo:TodoListBaseAddress", |
| 104 | + "value": "service.HomePage" |
| 105 | + } |
| 106 | + ] |
| 107 | + } |
| 108 | + ] |
| 109 | +} |
0 commit comments