My requirement is creating an application in Azure AD and grant Application permissions for that application and grant admin consent for those permissions.
I created an Azure Application through Azure Portal and grant few permissions:
I tried to grant admin consent but I get the below error
Please help me with this.
Thank you.
Please make sure to enable Audit Logs in Office365 to grant admin consent for Office 365 Management API permissions.
Make sure to enable Audit logs for Office365 by following this MsDoc.
Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $true
After enabling you will be able to grant admin consent for Office 365 Management API permissions successfully.