I have added a new applcation for OIDC authetication in Azure, anyone can access the application without any issues.
But the requirement is to get the AD membership of groups in the OIDC claim. To implement that I added the Microsoft Graph API. After adding it no new user can access that application, but old users who already accessed this application before can do that.
I am not getting a way where an application can be open to all but with Microsoft graph API enabled. I followed below article to get the group information in OIDC claim.