cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JimmyWork
Power Participant
Power Participant

Archive Team using Flow HTTP

Hi

I created a flow that archives a team, but im getting an error when im trying to use the "shouldSetSpoSiteReadOnlyForMembers": true

 

https://docs.microsoft.com/en-us/graph/api/team-archive?view=graph-rest-1.0#example

 

My error message.

{
  "error": {
    "code": "InvalidRequest",
    "message": "shouldSetSpoSiteReadOnlyForMembers is not supported in app-only context.\r\nParameter name: shouldSetSpoSiteReadOnlyForMembers",
    "innerError": {
      "request-id": "removed",
      "date": "2019-10-18T21:13:00"
    }
  }
}

2019-10-18 23_18_38-Edit your flow _ Microsoft Flow.png

1 ACCEPTED SOLUTION

Accepted Solutions
JimmyWork
Power Participant
Power Participant

This was solved by following this guide: https://laurakokkarinen.com/calling-microsoft-graph-from-microsoft-flow-and-other-daemon-apps-with-d...

 

Only issue i have left is if you make the SharePoint site for the Team to be read only once it gets archived then i can get it back to be edit if i restore the team. I can do it manually but not on Flow. So if you use shouldSetSpoSiteReadOnlyForMembers"true then when team is archived the sharepoint site is set to read only for users. 

 

The only thing you need is to call Graph using HTTP - Post

You can grab your Team ID and store it anywhere you like and use that in your flow when calling graph.

I can post the full flow if you still need it.

 

This is for archiving teams, so when i user clicks archive teams in my sharepoint list it will start an approval flow, if approved the Team gets archived and the site gets read only for users. I then have another flow to Unarchive the team, but im not able to get it to set the rights back to edit for members on the sharepoint site.

View solution in original post

2 REPLIES 2
McBlair
Helper II
Helper II

I'd be interested in see the whole flow as I'd to be able to archive flows too


@JimmyWork wrote:

Hi

I created a flow that archives a team, but im getting an error when im trying to use the "shouldSetSpoSiteReadOnlyForMembers": true

 

https://docs.microsoft.com/en-us/graph/api/team-archive?view=graph-rest-1.0#example

 

My error message.

{
  "error": {
    "code": "InvalidRequest",
    "message": "shouldSetSpoSiteReadOnlyForMembers is not supported in app-only context.\r\nParameter name: shouldSetSpoSiteReadOnlyForMembers",
    "innerError": {
      "request-id": "removed",
      "date": "2019-10-18T21:13:00"
    }
  }
}

2019-10-18 23_18_38-Edit your flow _ Microsoft Flow.png


 

JimmyWork
Power Participant
Power Participant

This was solved by following this guide: https://laurakokkarinen.com/calling-microsoft-graph-from-microsoft-flow-and-other-daemon-apps-with-d...

 

Only issue i have left is if you make the SharePoint site for the Team to be read only once it gets archived then i can get it back to be edit if i restore the team. I can do it manually but not on Flow. So if you use shouldSetSpoSiteReadOnlyForMembers"true then when team is archived the sharepoint site is set to read only for users. 

 

The only thing you need is to call Graph using HTTP - Post

You can grab your Team ID and store it anywhere you like and use that in your flow when calling graph.

I can post the full flow if you still need it.

 

This is for archiving teams, so when i user clicks archive teams in my sharepoint list it will start an approval flow, if approved the Team gets archived and the site gets read only for users. I then have another flow to Unarchive the team, but im not able to get it to set the rights back to edit for members on the sharepoint site.

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (925)