Hi Yun,
Many thanks for this. Very useful.
Doing so, I create a demo tenant with Business Central trial. I did the step you are describing in Manage environments via Admin API.
However, I'm facing the following error when I'm trying to get the access token (with admin account of the tenant):
AADSTS50020: User account '{EmailHidden}' from identity provider 'sts.windows.net/.../' does not exist in
tenant 'Contoso 2 (MS Virtual Event)' and cannot access the application 'a19cb26a-2e4c-408b-82e1-6311742ecc50'(App for managing Business Central environments) in that tenant. The account needs to be added
as an external user in the tenant first. Sign out and sign in again with a different Azure Active Directory user account.
Tried to figure out this issue, but no solution found. Any idea maybe ?
Thanks.