Thank you for posting your question in Microsoft Q&A.
As per your requirement I see that you are assigning a license to group of users. This will be considered as Group base licensing. To get answers to your questions you can see below,
- There is no way you can get back where AAD will display the question "enable for all users".
- This error comes up because P2 license is dependent on service plan exchange online archiving, exchange online kiosk, exchange online.
This means you can assign P2 license to users in a groups who already have "exchange online archiving, exchange online kiosk, exchange online" licenses assigned.
The error that you get as above is a dependance violation. P2 license is dependent on exchange online archiving, exchange online kiosk, exchange online. You can only assign this license to users who already have exchange online archiving, exchange online kiosk, exchange online licenses.
One of the products specified in the group contains a service plan that must be enabled for another service plan, in another product, to function. This error occurs when Azur AD attempts to add/remove the underlying service plan,
You can also refer article https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/licensing-groups-resolve-problems#other-products-depend-on-this-license
Let me know if you have any further questions.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.