Hi anonymous user,
I understand that you want to share a single AppRole between your Web API and web application.
I do not believe that this is possible because both the Web API app and web application would fall under the category of an app service, and Application Roles are meant to be very specific to the application they are defined for. Behind the scenes these would operate mostly the same in Azure since it sounds like you have two separate apps and app registrations.
Just to make sure though I have reached out to the product team to confirm if there is any way to accomplish this, and will update you if they have a solution. There was a similar question asked in Stack Overflow in 2020, and some workarounds were offered.
If you would like to make a feature request for the ability to share the app roles across multiple applications, you can create one in the Ideas forum and share the link so that I can bubble it up. https://feedback.azure.com/
See also: Manage Azure AD App roles across many applications
Thanks,
Marilee