pnp / provision-assist-m365

Provision Assist is a request and provisioning solution for Teams, Groups, SPO Sites and Viva Engage Communities in Microsoft 365. It can be used as part of a Copilot for Microsoft 365 deployment.
MIT License
62 stars 9 forks source link

Option for auto-approval of requests #61

Closed wapster182 closed 7 months ago

wapster182 commented 8 months ago

Suggestion

We would like to have the option to auto approve all requests. Maybe to make it work faster without the need to implement it into some setting, just give some info how to edit the Flow to auto approve it, so skipping the steps of Approvals (or add some actions in the Flow to set the SharePoint list items Status to approved automatically).

alexc-MSFT commented 8 months ago

@wapster182 I've implemented this via a new setting in the settings list and it will be released with the other new functionality that we are discussing.

alexc-MSFT commented 8 months ago

@wapster182 this is also now done. Please add the following setting to the settings list:

image

wapster182 commented 7 months ago

I tested this, unfortunately did not work yet.

image

{ "error": { "code": "BadRequest", "message": "Navigation binding uri for the property 'template@odata.bind' is not valid., Unable to extract object from request.", "innerError": { "date": "2024-02-09T15:41:49", "request-id": "f9f8e717-7843-49a5-a6c1-af5d8d279607", "client-request-id": "f9f8e717-7843-49a5-a6c1-af5d8d279607" } } }

Do I need to re-run the scripts to create the logic apps? Is there anything changed in them that need to be updated?

wapster182 commented 7 months ago

Hey @alexc-MSFT, could you check on this?

wapster182 commented 7 months ago

Hi @alexc-MSFT, I just tested it: I Re-deployed the entire enviroment using the PS scripts, unfortunately the same error. It seems the error has nothing to do with the auto-approval. I set the value to false and the manuall approval was triggered. This has worked fine, until the Logic App tries to create the space.

Maybe there is something wrong because of the new skip template / default data classification setting?

wapster182 commented 7 months ago

I did some further testing. When I use a team site as space type, the logic app flow works and creates the space.

I think it has to be a problem with the Teams creation and the new skip template / default data classification.

Can you look into this?

alexc-MSFT commented 7 months ago

@wapster182 so yes as you say that error is not related to auto approval. Can you check the request in the Provisioning Requests list and look at the values of the 'Teams Template' and 'Teams Template Title' columns? I assume this request is using a custom template which perhaps can't be found. Let me know what those columns are populated with please. Thanks

wapster182 commented 7 months ago

Thanks for leading to a possible solution. I checked it, in the Request List the data looks like this:

image

Teams Template and Teams Template Title are empty.

In the Settings List I have this values:

image

In the Types List I have this values:

image

alexc-MSFT commented 7 months ago

@wapster182 I've found the issue, the new setting for hiding the site template screen didn't take into account setting a default teams template (it should be set to 'Standard' for a provisioning request unless a template is specified). I've fixed the app, I just need to repackage it. You will only need to import the updated solution as opposed to any backend components.

alexc-MSFT commented 7 months ago

@wapster182 though it is worth noting I am about to push some general bug fixes too

alexc-MSFT commented 7 months ago

@wapster182 all done, the latest release contains the above fix and some other bug fixes (azure components)

wapster182 commented 7 months ago

I wanted to test it, but it seems another BUG was introduced.... When trying to create a new request, I cannot go past the Recommendation screen in Step 2:

image

When hitting the Next button nothing happens.

Can you please check this soon, thank you

alexc-MSFT commented 7 months ago

@wapster182 so I've had this earlier during a deployment and it was due to the new columns not being created in the Provisioning Types list, we then had to refresh the list data source in the app and then republish.

Make sure the columns are created exactly as per this issue - https://github.com/pnp/provision-assist-m365/issues/59. Specifically the ones in the Provisioning Types list. Make sure the name is exactly the same too.

wapster182 commented 7 months ago

Thanks, due to the re-import and re-executing of the scripts the SharePoint lists got somehow not overwritten but appended, so I had a mess in the columns: image

Great advice, thanks. The auto-approval is working now!