Just simply get workspaces in a workspacecollection.
1) I use the access key of a collection in Azurecloud, it succeeds.
PS C:\> powerbi get-workspaces -k 1H2F82h8GCQORHD4ulJzu+IEB.......... == -c {collection name} [ powerbi ] ================================================ [ powerbi ] Gettings workspaces for Collection: {collectio name} [ powerbi ] ================================================ [ powerbi ] df708252-015b-4da1-bdb8-..... [ powerbi ] 4d0485b1-e8e0-4b5f-9e10-.....
2) I use the access key of a collection in AzureChinaCloud, it fails with code 403.
PS C:\> powerbi get-workspaces -k 9RDLV14ePc6yx4oeZPO..... -c {collection name} [ powerbi ] Method: GET [ powerbi ] Url: https://api.powerbi.com/v1.0/collections/{collection name}/workspaces [ powerbi ] Status Code: 403 [ powerbi ] content-length : 0 [ powerbi ] server : Microsoft-HTTPAPI/2.0 [ powerbi ] strict-transport-security : max-age=31536000; includeSubDomains [ powerbi ] x-frame-options : deny [ powerbi ] x-content-type-options : nosniff [ powerbi ] requestid : 43a7145d-530b-4737-8ec7-6b0fa8940f79 [ powerbi ] date : Fri, 10 Feb 2017 19:25:17 GMT [ powerbi ] connection : close
It seems that the access key is not recognized as a legal one. But I am sure I just copied it from my account portal. So it means the backend cannot find this access key.
I also notice that powerbi-cli has an argument --baseUri, so I think the baseUri for different cloud environment is different.