1p app u need ARM’s .default scope and a role on the tenant‑root and without that top grant the token looks ok but ARM won’t honor it.
How to use 1p app to call for azure resource management API ?
Hello
I want to use ARM API https://learn.microsoft.com/en-us/rest/api/resources/tenants/list?view=rest-resources-2022-12-01&tabs=HTTP#code-try-0 I have 1p app setup in my service and want to use that 1p app to call this API. Can you please povide me what steps I need to follow to allow my 1p app to call ARM API ?
I have completed my Prof of cocept for 3p app but I am looking to guide for 1p app.
Microsoft Security | Microsoft Graph
3 answers
Sort by: Most helpful
-
-
Jocelyn Micaela Gallardo Michea 0 Reputation points
2026-02-19T04:13:01.58+00:00 No puedo ver el código de verificación para entrar como lo puedo Aser
-
Q&A Assist2026-02-18T21:47:25.77+00:00 AI generated content. This question contains an answer created with AI from Q&A Assist. Learn moreTo use a first-party (1p) application to call the Azure Resource Management (ARM) API, you need to follow these steps:
- Register Your Application: Ensure that your 1p app is registered in Azure Active Directory (Azure AD). This involves creating an application registration in the Azure portal.
- Expose API Permissions: You need to expose the necessary permissions for your application to call the ARM API. This typically includes adding application permissions that allow your app to access the resources it needs.
- Navigate to the App registrations section in the Azure portal.
- Select your application and go to the API permissions section.
- Click on Add a permission, then choose APIs my organization uses to find the ARM API and add the required permissions.
- Grant Admin Consent: After adding permissions, make sure to grant admin consent for the permissions to take effect. This is usually done in the same API permissions section.
- Obtain an Access Token: Use the OAuth 2.0 authorization code flow to obtain an access token for your application. You will need to request an authorization code from Azure AD, which involves making a request to the
/authorizeendpoint with the required parameters such asclient_id,redirect_uri, andresource. - Call the ARM API: Once you have the access token, you can make calls to the ARM API. Include the access token in the Authorization header of your HTTP request to the ARM API endpoint.
- Handle Responses: Ensure that you handle the responses from the ARM API appropriately, including any error responses that may occur.
By following these steps, you should be able to successfully configure your 1p app to call the Azure Resource Management API.