Open floushee opened 2 years ago
@jiasli for awareness
It is working when I remove the "lang" property. Until now it did not matter. The "lang"=null is also visible in manifest json in the portal and I have seen it in some blog posts etc like this. So I might not be the only one who gets confused by this new behaviour and it would make sense to fix it, or at least provide some error message.
I saw the PR https://github.com/pnp/cli-microsoft365/pull/3137 just deletes lang
property:
if (graphManifest.appRoles) {
graphManifest.appRoles.forEach((role: any) => {
delete role.lang;
});
}
Actually, Azure CLI's az ad app update --id {} --app-roles {}
doesn't make any special processing for appRole
property. It sends the JSON to Update application API as-is:
The appRole resource type doesn't have lang
property, so the Microsoft Graph service returned that error.
Indeed, we can add some special logic on the client side (Azure CLI) to remove the lang
property here:
but I think it would be more reasonable for the manifest to be consistent with Microsoft Graph API. I will work internally with Microsoft Graph team on this.
This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az ad app update
Errors:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az ad app update --id {} --app-roles {}
Expected Behavior
Environment Summary
Additional Context
Today Azure DevOps rolled out the Azure CLI version 2.37, which forced me to migrate some of our Azure CLI steps as explained in this migration guide: https://docs.microsoft.com/en-gb/cli/azure/microsoft-graph-migration
The only thing that is still not working is the update of our app registration's roles. We are currently using the following json file for the roles deployment:
[ { "allowedMemberTypes": [ "User" ], "description": "Grafana read only Users", "displayName": "Grafana Viewer", "id": "....", "isEnabled": true, "lang": null, "origin": "Application", "value": "Viewer" }, { "allowedMemberTypes": [ "User" ], "description": "Grafana Editor Users", "displayName": "Grafana Editor", "id": "...", "isEnabled": true, "lang": null, "origin": "Application", "value": "Editor" } ]
It looks like this was already fixed in a different cli: https://github.com/pnp/cli-microsoft365/issues/3131