cli-microsoft365 icon indicating copy to clipboard operation
cli-microsoft365 copied to clipboard

New command: m365 pp website webresource list

Open appieschot opened this issue 1 year ago • 7 comments

Usage

m365 pp website webresource list

Description

List all webresource for the specified Power Pages website

Options

Option Description
--websiteId [websiteId] ID of the Power Pages website. Specify either websiteId or websiteName but not both.
--websiteName [websiteName] The unique name (not the display name) of the Power Pages website. Specify either websiteId or websiteName but not both.
-e, --environmentName <environmentName> The name of the environment where the Power Pages websites are located.
--asAdmin Run the command as admin and retrieve Power Pages websites for environments you do not have explicitly assigned permissions to.

Examples

List all webresources for the site Contoso

m365 pp website webresource list --websiteName Contoso --environmentName "Default-2ca3eaa5-140f-4175-8261-3272edf9f339"

List all webresources for the site by id

m365 pp website webresource list --websiteId 2ca3eaa5-140f-4175-8261-3272edf9f339--environmentName "Default-2ca3eaa5-140f-4175-8261-3272edf9f339"

Default properties

  • webresourceid
  • displayname
  • ishidden

Additional Info

https://learn.microsoft.com/en-us/power-apps/developer/data-platform/reference/entities/webresource and https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/reference/webresource?view=dataverse-latest

See our m365 pp card list command on how to implement the as admin, and how to retrieve all items from a given endpoint: https://github.com/pnp/cli-microsoft365/blob/main/src/m365/pp/commands/card/card-list.ts

In this case the API call would be GET to ${dynamicsApiUrl}/api/data/v9.2/webresourceset

appieschot avatar Sep 11 '24 08:09 appieschot

also here I noticed in the description that we refer to webName instead of websiteName. Other than that lets open it up 👍

Adam-it avatar Sep 11 '24 22:09 Adam-it

May I take this up!

ktskumar avatar Sep 22 '24 03:09 ktskumar

hi @ktskumar, This issue will take part in the Hacktoberfest event which will take part during October. You may read more about this event here: https://github.com/pnp/cli-microsoft365/discussions/6383

If you want to participate and make this PR count towards this event please be sure to open the PR in October (no sooner and no later 😉)

Adam-it avatar Sep 24 '24 09:09 Adam-it

This api ${dynamicsApiUrl}/api/data/v9.2/webresourceset is not working . Need help on how to use this..

ktskumar avatar Oct 08 '24 04:10 ktskumar

@ktskumar sorry to hear it is not working for you. What exactly is not working, happy to see if I can help with details if I understand what is failing.

appieschot avatar Oct 08 '24 06:10 appieschot

@ktskumar sorry to hear it is not working for you. What exactly is not working, happy to see if I can help with details if I understand what is failing.

API /api/data/v9.2/webresourceset not returning anything.. Returns Error code:5 and looks like response getting crashed.

ktskumar avatar Oct 13 '24 04:10 ktskumar

Hi @appieschot , Please let me know on how to proceed this.

ktskumar avatar Oct 19 '24 01:10 ktskumar