Microsoft graph - License Overview - get

Is there a possibility to build a Microsoft Graph GET request to get a license overview like this:

The closest Graph API endpoint is
GET /subscribedSkus
which returns the list of commercial subscriptions that an organization has acquired.
Check properties of subscribedSku resource and compare them with properties returned by Get-MsalAccountSku
Resources:
List subscribedSkus
subscribedSku resource type

Related

MS Graph get all values of a field

In my app, the user should be able to choose a company, in which his article gets published.
The Azure Active Directory has the Company name for that, which is maintained by our AAD Team. Is there any way to request all values from this field? Like a SELECT DISTINCT in SQL?
AFAIK, currently there is no way to request all distinct values using companyName attribute.
You can use filter parameter by looping through each companyName.
Please note that Distinct is not supported in Microsoft graph API.
You can raise Azure Support ticket or feature request for the same by visiting below link:
Azure Support Options | Microsoft Azure
References:
Is there a way to query distinct user profile attribute values from the Graph API? For example $select=Distinct(jobTitle)? The scenario would be to build a "refinement" experience for a People Search experience. - Microsoft Q&A
Distinct values in Microsoft Graph query - Stack Overflow

Azure API Management - How to execute product policy when product does not require subscription?

I have a product published that does not requires a subscription. The 4 APIs that compose it also does not. How can I define policies on a product level?
Such policies seem to work only when both the APIs AND the product require subscription AND the request is made using the product subscription key.
Prerequisites:
API subscription switched off:
Product subscription switched off:
Product added to API:
Product has policies defined, example:
If above points are true, just call your API without Ocp-Apim-Subscription-Key header and APIM will automatically execute API and attached product policies. If you provide Ocp-Apim-Subscription-Key with correct value, like for example administrator subscription key, APIM will only execute API policies.
To reduce the frustration it is important to understand policy order execution. Read the whole article here but in short the order is:
Global scope
Product scope
API scope
Operation scope
One last thing, if non subscription product is attached to non subscription API and its policies are executed automatically, you may wonder what happens if we add second open product to the API? Policies from which product will be executed? Turns out, this is not possible (what makes sense). Attempting to add second open product will result in following error:

Is there any REST API available to list owners of an azure resource group?

The REST API which is available to list role assignments of a resource group by MS results with few properties in which neither DisplayName nor RoleDefinitionName specified. But all the expected details could be fetched using PowerShell as stated in this link.
Need to fetch the same details via an api call. Is there any possible way or REST API currently available to fetch details of all the Owners of a particular resource group in Azure?
You can use MS graph api to list the owners of resource groups:
GET https://graph.microsoft.com/v1.0/groups/{id}/owners

Is there any way to fetch azure subscription compliance by specific initiative/policyset

There are many policies applied to subscription, but for me requirement is to fetch the compliance only w.r.t specific initiative/policyset.
Followed this article https://learn.microsoft.com/en-us/azure/governance/policy/how-to/get-compliance-data by wasn't able to that, so needed help or some pointers in fetching compliance data for specific initiative via cli or rest apis.
So solution that I have now is this: https://learn.microsoft.com/en-us/rest/api/policy-insights/policystates/summarizeforsubscription
We need to make POST request to https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/latest/summarize?api-version=2019-10-01
Above API call returns the data for all policies applied to the subscription and there we can also list initiatives, from there we can filter specific initiative/policyset and it's compliance status.

Get SharePoint group names with Graph API

Is there a way to get the SharePoint security groups at site collection/site level with Graph API? I have followed Graph API article by MS but no where they mentioned about pulling information from security groups. I want to use this Graph API url in my power apps to apply role based security.
It isn't possible to interact SharePoint's own user or group resource via Microsoft Graph at the moment. For the time being you would need to use the classic SharePoint REST API (i.e. /_api/web/siteusers) for this.

Resources