@@ -20,13 +20,10 @@ public static List<string> GetQuotaExceededMitigation(string location)
2020
2121 return new List < string >
2222 {
23- "Your Azure subscription has reached its quota limit for App Service Plans in this SKU tier" ,
24- "Option 1: Request a quota increase in Azure Portal > Subscriptions > Usage + quotas" ,
25- "Option 2: Use a Free tier (F1) for development/testing by updating 'planSku' to 'F1' in a365.config.json" ,
26- "Option 3: Use a different Azure subscription with available quota" ,
27- "Option 4: Delete unused App Service Plans to free up quota" ,
28- $ "Option 5: Try a different region - update 'location' in a365.config.json (current: { locationDisplay } )",
29- "Learn more: https://learn.microsoft.com/azure/app-service/app-service-plan-manage#quotas"
23+ "Your Azure subscription has reached its quota limit for App Service Plans in this SKU tier." ,
24+ "For development/testing, update 'planSku' to 'F1' in a365.config.json to use Free tier." ,
25+ "For production, request quota increase at: Azure Portal > Subscriptions > Usage + quotas" ,
26+ $ "Current location: { locationDisplay } . Consider trying a different region if quota is unavailable."
3027 } ;
3128 }
3229
@@ -40,11 +37,9 @@ public static List<string> GetSkuNotAvailableMitigation(string location, string
4037
4138 return new List < string >
4239 {
43- $ "The SKU '{ skuDisplay } ' is not available in region '{ locationDisplay } '",
44- "Option 1: Change the 'planSku' in a365.config.json to a supported SKU (F1, B1, B2, S1, S2, P1V2, P2V2)" ,
45- $ "Option 2: Change the 'location' in a365.config.json to a region that supports '{ skuDisplay } '",
46- "Option 3: Use Free tier (F1) for development/testing" ,
47- "Check SKU availability: https://azure.microsoft.com/pricing/details/app-service/"
40+ $ "SKU '{ skuDisplay } ' is not available in region '{ locationDisplay } '.",
41+ "Update 'planSku' in a365.config.json to a supported SKU: F1, B1, B2, S1, S2, P1V2, P2V2" ,
42+ $ "Or change 'location' in a365.config.json to a region that supports '{ skuDisplay } '."
4843 } ;
4944 }
5045
@@ -55,11 +50,9 @@ public static List<string> GetAuthorizationFailedMitigation()
5550 {
5651 return new List < string >
5752 {
58- "You don't have sufficient permissions to create App Service Plans in this subscription or resource group" ,
59- "Required role: Contributor or Owner on the subscription or resource group" ,
60- "Check your current role: Run 'az role assignment list --assignee $(az account show --query user.name -o tsv) --all'" ,
61- "Contact your Azure administrator to grant the required permissions" ,
62- "Verify you're using the correct subscription: 'az account show'"
53+ "Insufficient permissions to create App Service Plans in this subscription or resource group." ,
54+ "Required role: Contributor or Owner on the subscription or resource group." ,
55+ "Contact your Azure administrator to grant the required permissions."
6356 } ;
6457 }
6558
@@ -70,12 +63,10 @@ public static List<string> GetVerificationTimeoutMitigation()
7063 {
7164 return new List < string >
7265 {
73- "The App Service Plan was created but is taking longer than expected to appear in Azure" ,
74- "This usually indicates an Azure propagation delay or regional issue" ,
75- "Option 1: Wait a few minutes and check Azure Portal to confirm the plan exists" ,
76- "Option 2: If the plan exists in Portal, run the setup command again (it will skip creation)" ,
77- "Option 3: If the plan doesn't exist after 5+ minutes, delete the resource group and retry" ,
78- "Check Azure status: https://status.azure.com"
66+ "App Service Plan creation is taking longer than expected." ,
67+ "Wait a few minutes and check Azure Portal to confirm the plan exists." ,
68+ "If the plan exists, run the command again (it will skip creation)." ,
69+ "If issues persist, check Azure service status at https://status.azure.com"
7970 } ;
8071 }
8172
@@ -86,12 +77,10 @@ public static List<string> GetGenericAppServicePlanMitigation()
8677 {
8778 return new List < string >
8879 {
89- "App Service Plan creation failed due to an unexpected Azure error" ,
90- "Option 1: Check the error details above for specific Azure error messages" ,
91- "Option 2: Verify your Azure subscription is active and has no billing issues" ,
92- "Option 3: Try a different region by updating 'location' in a365.config.json" ,
93- "Option 4: Check Azure service health: https://status.azure.com" ,
94- "Learn more: https://learn.microsoft.com/azure/app-service/app-service-plan-manage"
80+ "App Service Plan creation failed." ,
81+ "Verify your Azure subscription is active and has no billing issues." ,
82+ "Try a different region by updating 'location' in a365.config.json." ,
83+ "Check Azure service status at https://status.azure.com"
9584 } ;
9685 }
9786
@@ -148,20 +137,9 @@ public static List<string> GetMosServicePrincipalMitigation(string appId)
148137 {
149138 return new List < string >
150139 {
151- $ "Failed to create service principal for application { appId } ",
152- "" ,
153- "You need one of these roles to create service principals:" ,
154- " - Application Administrator (recommended)" ,
155- " - Cloud Application Administrator" ,
156- " - Global Administrator" ,
157- "" ,
158- "To check your current roles:" ,
159- " az rest --method GET --url https://graph.microsoft.com/v1.0/me/memberOf" ,
160- "" ,
161- "Contact your tenant administrator if you don't have these roles." ,
162- "" ,
163- "Alternatively, ask your admin to run this Azure CLI command:" ,
164- $ " az ad sp create --id { appId } "
140+ $ "Insufficient privileges to create service principal for { appId } .",
141+ "Required role: Application Administrator, Cloud Application Administrator, or Global Administrator." ,
142+ $ "Ask your tenant administrator to run: az ad sp create --id { appId } "
165143 } ;
166144 }
167145
@@ -172,18 +150,10 @@ public static List<string> GetFirstPartyClientAppServicePrincipalMitigation()
172150 {
173151 return new List < string >
174152 {
175- "Failed to create service principal for Microsoft first-party client app" ,
176- "This app is required for MOS token acquisition" ,
177- "" ,
178- "You need one of these roles:" ,
179- " - Application Administrator (recommended)" ,
180- " - Cloud Application Administrator" ,
181- " - Global Administrator" ,
182- "" ,
183- "Ask your tenant administrator to run:" ,
184- $ " az ad sp create --id { MosConstants . TpsAppServicesClientAppId } ",
185- "" ,
186- "Or grant you one of the required roles above."
153+ "Insufficient privileges to create service principal for Microsoft first-party client app." ,
154+ "This app is required for MOS token acquisition." ,
155+ "Required role: Application Administrator, Cloud Application Administrator, or Global Administrator." ,
156+ $ "Ask your tenant administrator to run: az ad sp create --id { MosConstants . TpsAppServicesClientAppId } "
187157 } ;
188158 }
189159
@@ -194,20 +164,12 @@ public static List<string> GetMosResourceAppsServicePrincipalMitigation()
194164 {
195165 return new List < string >
196166 {
197- "Failed to create service principals for MOS resource applications" ,
198- "These service principals are required for MOS API access" ,
199- "" ,
200- "You need one of these roles:" ,
201- " - Application Administrator (recommended)" ,
202- " - Cloud Application Administrator" ,
203- " - Global Administrator" ,
204- "" ,
205- "Ask your tenant administrator to run these commands:" ,
167+ "Insufficient privileges to create service principals for MOS resource applications." ,
168+ "Required role: Application Administrator, Cloud Application Administrator, or Global Administrator." ,
169+ "Ask your tenant administrator to run:" ,
206170 " az ad sp create --id 6ec511af-06dc-4fe2-b493-63a37bc397b1" ,
207171 " az ad sp create --id 8578e004-a5c6-46e7-913e-12f58912df43" ,
208- " az ad sp create --id e8be65d6-d430-4289-a665-51bf2a194bda" ,
209- "" ,
210- "Or grant you one of the required roles above."
172+ " az ad sp create --id e8be65d6-d430-4289-a665-51bf2a194bda"
211173 } ;
212174 }
213175
@@ -218,11 +180,9 @@ public static List<string> GetMosAdminConsentMitigation(string clientAppId)
218180 {
219181 return new List < string >
220182 {
221- "Grant admin consent in Azure Portal:" ,
222- $ " 1. Go to: https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade/~/CallAnAPI/appId/{ clientAppId } ",
223- " 2. Click 'Grant admin consent for [Your Organization]'" ,
224- " 3. Wait 1-2 minutes for consent to propagate" ,
225- "Alternatively, authenticate interactively when running 'a365 publish' and consent when prompted."
183+ "Admin consent required for MOS API permissions." ,
184+ $ "Grant consent at: https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade/~/CallAnAPI/appId/{ clientAppId } ",
185+ "Click 'Grant admin consent for [Your Organization]' and wait 1-2 minutes for propagation."
226186 } ;
227187 }
228188
0 commit comments