The teams channel get command uses the beta endpoint to filter groups as shown below.
The resourceProvisioningOptions filter is not supported in the v1.0 endpoint, but the displayName filter is, therefore we should implement the v1.0 endpoint in the request, keeping the displayName filter but removing the resourceProvisioningOptions filter, then filter the request response using JavaScript to remove any groups that are not Teams
|
const requestOptions: any = { |
|
url: `${this.resource}/beta/groups?$filter=resourceProvisioningOptions/Any(x:x eq 'Team') and displayName eq '${encodeURIComponent(args.options.teamName as string)}'`, |
|
headers: { |
|
accept: 'application/json;odata.metadata=none' |
|
}, |
|
responseType: 'json' |
|
}; |
The
teams channel getcommand uses thebetaendpoint to filter groups as shown below.The
resourceProvisioningOptionsfilter is not supported in the v1.0 endpoint, but thedisplayNamefilter is, therefore we should implement the v1.0 endpoint in the request, keeping thedisplayNamefilter but removing theresourceProvisioningOptionsfilter, then filter the request response using JavaScript to remove any groups that are not Teamscli-microsoft365/src/m365/teams/commands/channel/channel-get.ts
Lines 46 to 52 in 266fd8d