简体   繁体   中英

MS Graph API administration

How can I view all subscriptions regardless of the 'app registration' that created it?

On our AAD, we have 2 'App Registration', lets call them regAppA & regAppB. We ran into an issue where we used both apps to create subscription for outlook events. This resulted in multiple events firing for a single change which caused issues down the line when handling them.

The problem is if you call : GET https://graphUrl/subscriptions (with regAppA secret) you will only get the subscriptions created using that App Registration, and likewise with regAppB's secret

To avoid this situation happening again, I would like to run an automated script/program/whatever, that would get all subscriptions created regardless of the App Registration used to create it and flag issues found in the data.

I could do that using https://developer.microsoft.com/en-us/graph/graph-explorer , but I don't know how-to or if you can use delegated authentication programatically. I need this solution to run with no user intervention.

Any help will be much appreciated.

You can run Get-AzSubscription to get all subscriptions that the current account can access. https://docs.microsoft.com/en-us/powershell/module/az.accounts/get-azsubscription?view=azps-6.2.1

Login-AzureRMAccount
Get-AzureRmSubscription | Group-Object State, TenantId

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM