OfficeDev / microsoft-teams-apps-requestateam

Power Platform based solution that allows users to request teams and automates team creation.
MIT License
234 stars 65 forks source link

Multiple failures in the "Creating and deploying automation assets..." section of deploy.ps1..... #107

Closed IanMartin56 closed 2 years ago

IanMartin56 commented 4 years ago

Hi, deploy.ps1 is 'nearly' working for me but I am getting multiple failures in the 'Creating and deploying automation assets...' section. All of those errors are below but I believe that they might all originate from the 1st New-AzAutomationAccount : Operation returned an invalid status code 'BadRequest' error at line 576. I am also getting an error in the earlier Launching Azure CLI sign-in... which might be related and is immediately below. I have tried twice with the same results. I am using a Dev Tenant + a Trial Subscription. These are the only errors I am getting. The (anonymised) command line I am using is: .\deploy.ps1 -TenantName "MyTenant" -TenantID "xxxxxxxx-xxxx-xxx-xxxxxxxxxxx" -RequestsSiteName "Request_a_Team_App_SPOL_Sitev3" -RequestsSiteDesc "V3 SPOL site for the Request a Team App_Used to store Teams Requests" -ManagedPath "sites" -SubscriptionId xxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx -Location "uksouth" -ResourceGroupName "Request_a_Team_App_Resource_Groupv3" -AppName "Request_a_Team_App_AAD_Appv3" -ServiceAccountUPN "Request_Team_App_Svc@MyTenant.onmicrosoft.com" -UseMSGraphBeta $false -IsEdu $false -KeyVaultName "RequestTeamAppKvaultv3" Can anybody offer any suggestions as to what is going wrong here please?

Launching Azure CLI sign-in... Account Environment TenantId TenantDomain AccountType


IsaGlobalAdmin AzureCloud xxxxxxxx-xxxx-xxx-xxxxxxxxxxx MyTenant.onmicrosoft.com User
az : You have logged in. Now let us find all the subscriptions to which you have access... At C:\SwSetup\microsoft-teams-apps-requestateam-master\microsoft-teams-apps-requestateam-master\Deployment\Scripts\deploy.ps1:830 char:13

Creating and deploying automation assets... Automation account already exists - deleting... Automation account deleted Creating automation account... New-AzAutomationAccount : Operation returned an invalid status code 'BadRequest' At C:\SwSetup\microsoft-teams-apps-requestateam-master\microsoft-teams-apps-requestateam-master\Deployment\Scripts\deploy.ps1:576 char:9

Finished creating automation account Importing automation modules... New-AzAutomationModule : The Resource 'Microsoft.Automation/automationAccounts/teamsautomate-auto' under resource group 'Request_a_Team_App_Resource_Groupv2' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix At C:\SwSetup\microsoft-teams-apps-requestateam-master\microsoft-teams-apps-requestateam-master\Deployment\Scripts\deploy.ps1:585 char:9

Get-AzAutomationModule : The module was not found. Module name: Az.Accounts. At C:\SwSetup\microsoft-teams-apps-requestateam-master\microsoft-teams-apps-requestateam-master\Deployment\Scripts\deploy.ps1:587 char:17

New-AzAutomationModule : The Resource 'Microsoft.Automation/automationAccounts/teamsautomate-auto' under resource group 'Request_a_Team_App_Resource_Groupv2' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix At C:\SwSetup\microsoft-teams-apps-requestateam-master\microsoft-teams-apps-requestateam-master\Deployment\Scripts\deploy.ps1:591 char:9

Finished importing automation modules Importing and publishing runbooks... Import-AzAutomationRunbook : The Automation account was not found. At C:\SwSetup\microsoft-teams-apps-requestateam-master\microsoft-teams-apps-requestateam-master\Deployment\Scripts\deploy.ps1:598 char:9

Publish-AzAutomationRunbook : The Resource 'Microsoft.Automation/automationAccounts/teamsautomate-auto/runbooks/CheckSiteExists' under resource group 'Request_a_Team_App_Resource_Groupv2' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix At C:\SwSetup\microsoft-teams-apps-requestateam-master\microsoft-teams-apps-requestateam-master\Deployment\Scripts\deploy.ps1:603 char:9

Finished importing and publishing runbooks Creating automation variables... New-AzAutomationVariable : The Resource 'Microsoft.Automation/automationAccounts/teamsautomate-auto' under resource group 'Request_a_Team_App_Resource_Groupv2' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix At C:\SwSetup\microsoft-teams-apps-requestateam-master\microsoft-teams-apps-requestateam-master\Deployment\Scripts\deploy.ps1:610 char:9

New-AzAutomationVariable : The Resource 'Microsoft.Automation/automationAccounts/teamsautomate-auto' under resource group 'Request_a_Team_App_Resource_Groupv2' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix At C:\SwSetup\microsoft-teams-apps-requestateam-master\microsoft-teams-apps-requestateam-master\Deployment\Scripts\deploy.ps1:611 char:9

Finished creating automation variables Creating role assignments... New-AzRoleAssignment : The Resource 'Microsoft.Automation/automationAccounts/teamsautomate-auto' under resource group 'Request_a_Team_App_Resource_Groupv2' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix At C:\SwSetup\microsoft-teams-apps-requestateam-master\microsoft-teams-apps-requestateam-master\Deployment\Scripts\deploy.ps1:618 char:9

New-AzRoleAssignment : The Resource 'Microsoft.Automation/automationAccounts/teamsautomate-auto' under resource group 'Request_a_Team_App_Resource_Groupv2' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix At C:\SwSetup\microsoft-teams-apps-requestateam-master\microsoft-teams-apps-requestateam-master\Deployment\Scripts\deploy.ps1:619 char:9

Finished creating role assignments Finished automation assets deployment Deploying api connections...

alexc-MSFT commented 4 years ago

@IanMartin56 lets try and get you past initial error first which seems to indicate that the Azure CLI is not installed.

Please can you download and install it from here - https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest. Once this is done you will need to close and re-launch PowerShell.

This should solve the 'az login' error where 'az' is a CLI cmdlet.

alexc-MSFT commented 4 years ago

@IanMartin56 any updates please?

IanMartin56 commented 4 years ago

Hi Alex, I have just got back from holiday so will take a look next week after I have cleared whatever else has landed on my “desk” during the past 2 weeks.

Thanks.

Kind Regards Ian Martin

eMail: ian.martin@axa.com Desk: +44 (0)117 3734526\678 4526 Mobile: +44 (0)7977 917738\611 7738 Senior Consultant/UK Service Owner - Office 365 O365 & Collaboration, Workplace Chapter Group IT, AXA Group Operations Nightingale House, Redland Hill, Bristol, BS6 6UT, UK


From: Alex Clark notifications@github.com Sent: Friday, August 21, 2020 3:42:13 PM To: OfficeDev/microsoft-teams-apps-requestateam microsoft-teams-apps-requestateam@noreply.github.com Cc: MARTIN Ian ian.martin@axa.com; Mention mention@noreply.github.com Subject: [EXTERNAL] Re: [OfficeDev/microsoft-teams-apps-requestateam] Multiple failures in the "Creating and deploying automation assets..." section of deploy.ps1..... (#107)

@IanMartin56https://urldefense.com/v3/__https://github.com/IanMartin56__;!!BnkV9pdh5V0!V_wcX9IBU3TD7FMWcphxJfUiw3V2tSpn83TzWAYreiOUI5M28MNapiG53j1f9w$ any updates please?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/OfficeDev/microsoft-teams-apps-requestateam/issues/107*issuecomment-678326829__;Iw!!BnkV9pdh5V0!V_wcX9IBU3TD7FMWcphxJfUiw3V2tSpn83TzWAYreiOUI5M28MNapiGLS7G1Eg$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ALKTSFIISKDQP5KKYJL2B5TSB2BULANCNFSM4PVLJ3NQ__;!!BnkV9pdh5V0!V_wcX9IBU3TD7FMWcphxJfUiw3V2tSpn83TzWAYreiOUI5M28MNapiEHKTjI-g$.

Internal

This email originates from AXA Group Operations UK Ltd (reg. no. 1854856), a company registered in England and Wales, which has its registered office at 5 Old Broad Street, London EC2N 1AD, England.

This message and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this in error, you should not disseminate or copy this email. Please notify the sender immediately and delete this email from your system.

Please also note that any opinions presented in this email are solely those of the author and do not necessarily represent those of the AXA Group.

Email transmission cannot be guaranteed to be secure, or error free as information could be intercepted, corrupted, lost, destroyed, late in arriving or incomplete as a result of the transmission process. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of email transmission.

Finally, the recipient should check this email and any attachments for viruses. The AXA Group accepts no liability for any damage caused by any virus transmitted by this email.

IanMartin56 commented 4 years ago

Hi @alexc-MSFT , I have fixed the issue that I had and the app is now working fully. Azure CLI was installed but not at the latest version so I upgraded it but that did not fix the issue. The activity log on the Resource Group showed an error re using an account that was already associated with another Resource Group so I removed all previous instances of Resource Groups and then the script completed successfully and as above the app is now working fully. Thanks for you help.

alexc-MSFT commented 2 years ago

Closed due to inactivity - reopen if required