Comments (1)
Hi.
$list = Invoke-RestMethod @listOperations
Comment: First link can be empty - and point to a next link (or potentially multiple pages)
Comment: While you get more data - continue fetching and add result
while($list.nextLink){
$list2 = Invoke-RestMethod $list.nextLink -Headers $listOperations.Headers -Method Get
$data+=$list2.value;
$list.nextLink = $list2.nextlink;
}
$showOperations = $data;
$data does not get set if there is no value for $list.nextLink. Then the script does not work.
For the same tenant - if I set $showOperations = $list.value, I get an event as expected.
This works for me:
Comment: First link can be empty - and point to a next link (or potentially multiple pages)
Comment: While you get more data - continue fetching and add result
if ($null -ne $list.nextLink){
while($list.nextLink){
$list2 = Invoke-RestMethod $list.nextLink -Headers $listOperations.Headers -Method Get
$data+=$list2.value;
$list.nextLink = $list2.nextlink;
}
$showOperations = $data
}else{
Comment: Sometimes the first link is not empty.
$showOperations = $list.value
}
from azure-lighthouse-samples.
Related Issues (20)
- How to onboard multiple subscription which is present in the same tenant in azure lighthouse ? HOT 5
- Support for delegated management for management groups? HOT 2
- Subscription Deployment Schema is wrong date
- Can't Deploy Sample AZ Policy Template in Azure Portal
- How to compare authorizations array
- Automatic remediation (onboarding)
- whether "authorization" parameter in the ARM template is necessary or not
- Register Managed Services RP Partner error AADSTS500113 HOT 2
- Create-AzDiagPolicy.ps1 can't set diagnostic settings on subresources of StorageAccount
- API not retrieving tenant actions
- This repo is missing important files
- Create-AzDiagPolicy.ps1 fails for resourceType Microsoft.NetApp/netAppAccounts/capacityPools/volumes (and potentially others)
- Add PIM support for 'policy-delegate-management-groups' deployment. HOT 1
- Parsing of description for DelegatedResourceId & CustomerTenant ID fails on PSCore with Az.Resources 1.13.0
- delegated-resource-management-eligible-authorizations - asks for register preview feature HOT 6
- Template file to onboard subscription is invalid HOT 5
- Can't view customers from service providers view in Azure Lighthouse HOT 1
- Lighthouse Subscription Deployment fails HOT 1
- Deployment of Management Group level policy for Lighthouse fails HOT 5
- rg-delegated-resource-management - Give customer a dropdown list.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-lighthouse-samples.