Azure AD Log Analytics Workspace Missing

I received the following error while trying to view Azure AD > Security > Conditional Access > Insights and reporting:

In order for you to be able to leverage Log Analytics or Workbooks you first need to get permission for one of the following workspaces: ...

It also appeared when navigating to Azure AD > Monitor > Workbooks.

What had happened is that when this Microsoft 365 tenant was initially set up there was a different Azure subscription that has since been deleted. Azure was somehow configured to use a Log Analytics workspace from the deleted subscription so it was throwing the error.

How I Fixed It

In my case, the solution was annoyingly simple. Navigate to Azure AD > Monitor > Diagnostic settings. From there, edit the existing setting in the list and change the Subscription and Log Analytics workspace from the dropdowns in the Destination details section on the right. Click Save and you're done.