@Kristoffersen, Mona Olander ,
At this point it is not possible to retrieve health status for Azure AD B2C service using an API call. You would have to rely on the alerts from the service Health dashboard within the azure portal or create manual alert from the portal form the Service Heath blade. Please follow the video doc link on how to create the manual alert and you should see the following options form service health blade.
Here you can see the option for selecting B2C service and select relevant event type as needed.
This is how you can create the service health alert for B2C for now. This will incur some cost as it leverages Azure monitor but it will be minimalistic just for one service. For now , I have created a feature request on the Azure Feedback Portal and would request you to upvote the same.
In addition to the information above , I would like to provide some more information related to getting availability status in general as per the testing i did . There is a availabilityStatus function which can show details of most resources however it is not exposed for B2C type of resources through API at the moment . I checked this extensively and found that for non-directory type resources it is possible to query the availability status , either by querying individually or by querying the resource groups that resources are present in, as below .
- Individual resource health query for Key vault resource.
https://management.azure.com/subscriptions/b6396752-xxxx-xxxx-xxxx-xxxx6axxxxec/resourcegroups/dnszones/providers/microsoft.keyvault/vaults/keyvault001/providers/Microsoft.ResourceHealth/availabilityStatuses?api-version=2015-01-01
{
"value": [
{
"id": "/subscriptions/b6396752-xxxx-xxxx-xxxx-xxxx6axxxxec/resourcegroups/dnszones/providers/microsoft.keyvault/vaults/keyvault001/providers/Microsoft.ResourceHealth/availabilityStatuses/current",
"name": "current",
"type": "Microsoft.ResourceHealth/AvailabilityStatuses",
"location": "eastus",
"properties": {
"availabilityState": "Available",
"title": "Available",
"summary": "There aren't any known Azure platform problems affecting this key vault.",
"reasonType": "",
"occuredTime": "2021-12-28T10:46:43Z",
"reasonChronicity": "Transient",
"reportedTime": "2021-12-28T10:49:43.8491959Z"
}
}
]
}
- Resource health for all resources within a resource group .
https://management.azure.com/subscriptions/b6396752-xxxx-xxxx-xxxx-xxxx6axxxxec/resourceGroups/DNresourcegroup/providers/Microsoft.ResourceHealth/availabilityStatuses?api-version=2018-07-01
{
"value": [
{
"id": "/subscriptions/b6396752-xxxx-xxxx-xxxx-xxxx6axxxxec/resourcegroups/dnszones/providers/microsoft.keyvault/vaults/kl2020/providers/Microsoft.ResourceHealth/availabilityStatuses/current",
"name": "current",
"type": "Microsoft.ResourceHealth/AvailabilityStatuses",
"location": "southeastasia",
"properties": {
"availabilityState": "Available",
"title": "Available",
"summary": "There aren't any known Azure platform problems affecting this key vault.",
"reasonType": "",
"occuredTime": "2021-11-28T00:00:00Z",
"reasonChronicity": "Persistent",
"reportedTime": "2021-12-28T10:24:45.975933Z"
}
},
{
"id": "/subscriptions/b6396752-xxxx-xxxx-xxxx-xxxx6axxxxec/resourcegroups/dnszones/providers/microsoft.keyvault/vaults/kl2021/providers/Microsoft.ResourceHealth/availabilityStatuses/current",
"name": "current",
"type": "Microsoft.ResourceHealth/AvailabilityStatuses",
"location": "southeastasia",
"properties": {
"availabilityState": "Available",
"title": "Available",
"summary": "There aren't any known Azure platform problems affecting this key vault.",
"reasonType": "",
"occuredTime": "2021-11-28T00:00:00Z",
"reasonChronicity": "Persistent",
"reportedTime": "2021-12-28T10:24:45.975933Z"
}
},
{
"id": "/subscriptions/b6396752-xxxx-xxxx-xxxx-xxxx6axxxxec/resourcegroups/dnszones/providers/microsoft.storage/storageaccounts/dnszd859/providers/Microsoft.ResourceHealth/availabilityStatuses/current",
"name": "current",
"type": "Microsoft.ResourceHealth/AvailabilityStatuses",
"location": "centralus",
"properties": {
"availabilityState": "Available",
"title": "Available",
"summary": "There aren't any known Azure platform problems affecting this storage account.",
"reasonType": "",
"occuredTime": "2021-12-12T01:37:02Z",
"reasonChronicity": "Persistent",
"reportedTime": "2021-12-28T10:24:45.319437Z"
}
}
]
}
B2C is a directory type resource for which the same availability status is not available through API as of now. So lets say you have azure AD B2C directory as a resource within a resource group in your azure subscription and if you call the above Api for this resroucegroup as well , the output will be null . The API will return status for all the resources except B2C resource. Hope this clarifies your query . Should this be helpful , please do accept the post as answer so as to improve the relevancy of this post within the community because this helps others who are searching for similar queries. If you still have any query, please feel free to let us know and we will be happy to help .
Thank you.
----------------------------------------------------------------------------------------------------------------------------------------------------------
- Please don't forget to click on or upvote button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
- Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators