From: #2815 (comment)
In #2813 we introduced a command that allows you to operate on an AAD app using information stored in a .m365rc.json file, which contains the appId property with the ID of the AAD app. We should extend the aad app get command with a new --save option. When used, it will cause the command to write the information about the specified existing app to the .m365rc.json file in the working directory.
The logic for writing to the file:
- check if the file exists, create if it doesn't
- read the file contents as JSON, if there's an exception, throw
- if the contents already contain a reference to this appId, skip
- if the contents don't contain a reference to this appId, add it and write the updated object back to the file
- existing output remains as-is
From: #2815 (comment)
In #2813 we introduced a command that allows you to operate on an AAD app using information stored in a
.m365rc.jsonfile, which contains theappIdproperty with the ID of the AAD app. We should extend theaad app getcommand with a new--saveoption. When used, it will cause the command to write the information about the specified existing app to the.m365rc.jsonfile in the working directory.The logic for writing to the file: