M365 CLI Graph Call Responses #1652
-
Hi, Not sure if I am missing a trick or trying to do something that would be better done another way. However before I talk myself out of asking this, is there a way or if not, could there be a way to get the response of a command that makes a Graph call. So for example say I do M365 teams team add and I then want to get the Id of the resulting Team, albeit there would probably still need to be some string manipulation after getting the response. So that the Id could then be used further on in a script. I find this more necessary with a Team as the name is not unique and can be specified more than once when it comes to teams, however the underlying SharePoint site will be named accordingly and the id is of course unique. I am just worried that if I was to do something based on Name, I am predicting that it has never existed for anything I am doing SharePoint wise or if I am then going to retrieve the M365 Group or Team in a search, there could be more than one result based on name. I know I can achieve this using PowerShell cmdlets and getting the result of a create and then referencing a property of that variable and this may just be a Graph problem, but would be nice nonetheless to just get the response and go from there. Thanks Henry |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Typically, when the API that we call returns a response, we relay it to the output so that you can use it for subsequent operations, like you mentioned. If this is not the case for |
Beta Was this translation helpful? Give feedback.
Typically, when the API that we call returns a response, we relay it to the output so that you can use it for subsequent operations, like you mentioned. If this is not the case for
teams team add
then we could investigate if it's something that we have missed or if the PowerShell cmdlets do something special.