microsoft-teams-apps-requestateam icon indicating copy to clipboard operation
microsoft-teams-apps-requestateam copied to clipboard

Error creating Azure AD App

Open JESS-arichards opened this issue 2 years ago • 8 comments

Description

Error appears in script when created Azure AD app. Script continues and reports success but no app is created. Error report problem with password

Steps to reproduce

Running the script with the parameters a few timesbrings the same result

Expected results

Azure AD App created

Actual Results

No Azure AD App created

Solution component

Deployment Script

Operating system (environment)

Windows

Additional Info

No response

JESS-arichards avatar Jun 09 '22 11:06 JESS-arichards

I am getting the same Error. After the Notification: "This command or command group has been migrated to Microsoft Graph API. Please carefully review all breaking changes introduced during this migration"

There is an error saying unrecognized arguments: --password

The rest of the installation continues, until hitting an Error for the API Connection creation, which complains about argument --id: expected one argument which is supposed to be the App ID, used in the API Connector.

Did not encounter this issues a few weeks ago, so I would guess this is fairly new. teamsCreatorSetup

Leviani avatar Jun 30 '22 20:06 Leviani

And after digging a bit deeper, the issue is in line 544 of the deploy.ps1. az ad app create --display-name $appName --required-resource-accesses './manifest.json' --password $global:appSecret --end-date '2299-12-31T11:59:59+00:00'

Looking at the Microsoft Graph Migration Article https://docs.microsoft.com/en-us/cli/azure/microsoft-graph-migration I can see that: az ad app create/update has the following change: Remove --password and --credential-description. Use az ad app credential reset to let Graph service create a password for you (https://github.com/Azure/azure-cli/issues/20675)

So it seems that the Deploy.ps1 needs to be updated to reflect the new az ad app create command.

Leviani avatar Jul 04 '22 19:07 Leviani

Is there a work around to this issue? I need to be able to deploy this and am happy to do some legwork, but as is, the deployment script is not good for me.

nickmac88 avatar Jul 21 '22 17:07 nickmac88

Is there a work around to this issue? I need to be able to deploy this and am happy to do some legwork, but as is, the deployment script is not good for me.

For anyone else wondering... I was able to get to a workaround by commenting out --password $global:appSecret on line 530 and line 544 of the deploy.ps1 file.

In the event that these lines change you can search for the following lines in the script and just make sure to comment out or delete "password $global:appSecret"

az ad app update --id $app.appId --required-resource-accesses './manifest.json' #--password $global:appSecret

and

az ad app create --display-name $appName --required-resource-accesses './manifest.json' --end-date '2299-12-31T11:59:59+00:00 #--password$global:appSecret

After commenting these line out you will need to run the refreshclientsecret.ps1 described in the following wiki.

https://github.com/OfficeDev/microsoft-teams-apps-requestateam/wiki/Refreshing-Expired-Secrets

hopefully there will be a fix for this soon, but either way this is a solid workaround and only added a couple minutes to the deployment.

nickmac88 avatar Jul 21 '22 20:07 nickmac88

Hi All,

Can you please ensure you have the latest deploy.ps1 script, I fixed these issues about a month ago now and updated the cmdlets as required.

Thanks

alexc-MSFT avatar Jul 21 '22 22:07 alexc-MSFT

Hi All,

Can you please ensure you have the latest deploy.ps1 script, I fixed these issues about a month ago now and updated the cmdlets as required.

Thanks

Hi. I have found that the deployment guide Step 1 states to : "Download the latest release" which links to the page with 'Source code (zip) ' available to download. However the package is different to master, you need to use the "package" which is 'Master' that is referred to in the 'Prerequisites' section above Step 1. It's the master that contains the latest release NOT the link stating "Latest release".

dav1dbailey avatar Jul 22 '22 15:07 dav1dbailey

Hi All, Can you please ensure you have the latest deploy.ps1 script, I fixed these issues about a month ago now and updated the cmdlets as required. Thanks

Hi. I have found that the deployment guide Step 1 states to : "Download the latest release" which links to the page with 'Source code (zip) ' available to download. However the package is different to master, you need to use the "package" which is 'Master' that is referred to in the 'Prerequisites' section above Step 1. It's the master that contains the latest release NOT the link stating "Latest release".

This was exactly my issue.

nickmac88 avatar Jul 22 '22 17:07 nickmac88

Hi All,

Can you please ensure you have the latest deploy.ps1 script, I fixed these issues about a month ago now and updated the cmdlets as required.

Thanks

Will do, thanks for the update!

nickmac88 avatar Jul 22 '22 17:07 nickmac88

I guess this confusion could be easily circumvented if both Links in the Deployment Guide would point towards the same package ;) image

Leviani avatar Sep 07 '22 17:09 Leviani

Sorry folks, I have updated both the release and the documentation, so the latest version is linked from the deployment guide. Thanks

alexc-MSFT avatar Sep 16 '22 12:09 alexc-MSFT