Has anyone created a power automate flow that is able to increase a SharePoint site's storage? Users will fill out a form in Power Apps that is linked to a SharePoint site. Power automate will come in and pull that data, find the site that the user requested to increase storage on and do the increase for that user if it is under 300gb. If it is over 300gb, then approval will be needed. All of this will be recorded back to the SharePoint list that is holding this data.
Anyone ever create something like this?
Thank you so so so much!!
Hi @dixonbridgeta,
Yes, you could use another GET request to retrieve the existing StorageMaximumLevel value of the site via the Admin Centre type of request.
You can use that value in the body of the existing POST request and use an add function to calculate a new value by adding 102400. That new calculated value can be used in the same type of POST request.
Below is an updated example
{
"StorageMaximumLevel": "@{add(int(outputs('Send_an_HTTP_request_to_SharePoint_-_Get_Current_Storage_Level')?['body']['StorageMaximumLevel']), 102400)}"
}
Hi!
I have a question for ya. Is there a way to increase the storage by '100' instead of setting the value?
Right now I am using this:
{ "StorageMaximumLevel": "256000" }
which works great! But since there are many sites with different levels of storage, how can I say, 'increase this site by 100gb'?
Okay, I understand that part now. For some reason this just doesn't want to work for me:
"The parameter StorageMaximumLevel does not exist in method GetById"
Hi @dixonbridgeta,
In the POST request the site you are updating is specified in the <siteId> section of the Uri
_api/Microsoft.Online.SharePoint.TenantAdministration.Tenant/Sites('<siteId>')
The Site Address field will use the tenant administration site url, since we are interacting with the TenantAdministration.
In order to dynamically retrieve the SiteId value I added an example via a GET request. That request interacts with the site itself, not the tenant administration. That is why the site address value is different.
However, if you already know the SiteId value that GET request is not needed. Like in my blog example.
Hopefully that clarify things?
Hi again @Expiscornovus
I just looked over your site and you new example of SP storage increase: https://www.expiscornovus.com/2023/01/31/update-storage-limit-site/
My question is in this current example, you don't use a "Get" method and you don't seem to specify which site you are updating. It looks like it just goes to the Admin center. Am I misunderstanding?
yes I am. But why different from the get? I have them the same.
Hi @dixonbridgeta,
Another question. Are you using the SharePoint Admin Center site address in that second request? The Site Address should be different in the second (POST) request.
Let's say your domain is Contoso. In that case the SharePoint Admin Centre site address would be https://contoso-admin.sharepoint.com
Thank you so much for the constant replies! Unfortunately, it is still not working. I followed the instructions and now it just keeps timing out..
Hi @dixonbridgeta,
Yes, that is correct. That expression should be used in the Uri field of the Send an HTTP request with the POST method.
Below is a gif (click on it to see it in high resolution) how that would work via the expression editor and dynamic content.
1. Place your cursos between the '' characters
2. Type ['Id'] via the Expression tab
3. Place your cursor at the beginning
4. Click on the Dynamic content field tab and select the Body of the previous GET request action
5. Place your cursor at the end and click ok.