Azure CLI doesn't update the end-date of an app
Describe the bug Azure CLI doesn't update the end-date of an app
To Reproduce
az ad app update --id xxxxxxxxxxxxxxxxxx --end-date '2024-12-31'
Expected behavior To change the "endDate" after performing the change, but the result is the same:
az ad app list --app-id xxxxxxxxxxxxxxxxxx --query '[*].{"passwordCredentials": passwordCredentials}'
[
{
"passwordCredentials": [
{
"customKeyIdentifier": null,
"endDate": "2019-03-09T10:13:01.654805Z",
"keyId": "xxxxxxxxxxxxxxxxxx",
"startDate": "2018-03-09T10:13:01.654805Z",
"value": null
}
]
}
]
az ad app update --id xxxxxxxxxxxxxxxxxx --end-date '2024-12-31'
az ad app list --app-id xxxxxxxxxxxxxxxxxx --query '[*].{"passwordCredentials": passwordCredentials}'
[
{
"passwordCredentials": [
{
"customKeyIdentifier": null,
"endDate": "2019-03-09T10:13:01.654805Z",
"keyId": "xxxxxxxxxxxxxxxxxx",
"startDate": "2018-03-09T10:13:01.654805Z",
"value": null
}
]
}
]
Environment summary azure cli installed via PIP and being used in virtual environment
CLI version
az --version
azure-cli (2.0.42)
acr (2.1.0)
acs (2.2.0)
advisor (0.6.0)
ams (0.2.0)
appservice (0.2.0)
backup (1.2.0)
batch (3.3.0)
batchai (0.4.0)
billing (0.2.0)
cdn (0.1.0)
cloud (2.1.0)
cognitiveservices (0.2.0)
command-modules-nspkg (2.0.2)
configure (2.0.18)
consumption (0.4.0)
container (0.3.0)
core (2.0.42)
cosmosdb (0.2.0)
dla (0.2.0)
dls (0.1.0)
dms (0.1.0)
eventgrid (0.2.0)
eventhubs (0.2.0)
extension (0.2.0)
feedback (2.1.4)
find (0.2.12)
interactive (0.3.26)
iot (0.2.0)
keyvault (2.2.0)
lab (0.1.0)
monitor (0.2.0)
network (2.2.0)
nspkg (3.0.3)
profile (2.1.0)
rdbms (0.3.0)
redis (0.3.0)
reservations (0.3.0)
resource (2.1.0)
role (2.1.0)
servicebus (0.2.0)
servicefabric (0.1.0)
sql (2.1.0)
storage (2.1.0)
vm (2.1.0)
Extensions:
image-copy-extension (0.0.7)
Python location '/Users/fjorg1/Utils/venv3.6/bin/python'
Extensions directory '/Users/fjorg1/.azure/cliextensions'
Python (Darwin) 3.6.5 (default, Mar 30 2018, 06:42:10)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]
Legal docs and information: aka.ms/AzureCliLegal
OS Version : macOS Highg Sierra - 10.13.6
Shell Type:
bash --version
GNU bash, version 4.4.19(1)-release (x86_64-apple-darwin16.7.0)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Install Method (e.g. pip, interactive script, apt-get, Docker, MSI, edge build) / CLI version (`az --version`) / OS version / Shell Type (e.g. bash, cmd.exe, Bash on Windows)
before we make the az ad app credential ready , will az ad sp credential reset/delete work for you?
Hi,
I didn't try to delete because I have already tons of jobs in Jenkins using this credentials, the subscription which we use this SP is our Sandbox.
About the reset, I don't know what it means exactly, but I didn't try as well.
Btw, I couldn't find any subcomand credential along the az ad app command, see:
az ad app --help
Group
az ad app : Manage applications with AAD Graph.
Commands:
create : Create a web application, web API or native application.
delete : Delete an application.
list : List applications.
show : Get the details of an application.
update : Update an application.
az ad app credential --help
az ad app: 'credential' is not in the 'az ad app' command group. See 'az ad app --help'.
Regards,
Flamarion
> I couldn't find any subcomand credential along the az ad app command
@flamarion, sorry for the confusion. That is expected, but credential commands under az ad sp will do the same thing. I thought you can delete and add back the credential with correct end date; but I understand this might not be acceptable.
For context, we will have a graph command overhaul effort coming soon to make credential update command available under az ad app as well once we have the REST API spec gets finalized. You can always wait for a couple of sprints to use the good one if your task is not urgent.
No, the task is not urgent, but can't be put on hold. In the end I have 'only' 6 months before my SP expire and start a really big headache.
I cross checked the doc. Updating existing credential entry is not supported (not mutable), you will have to remove and add a new one, which my #7694 will have this supported