Forum Discussion
Kukdai
Jul 24, 2026Copper Contributor
Web invoke in power automate says unauthorized but can browse from browser
I am able to browse to this url directly from browser
https://my365.crm9.dynamics.com/api/data/v9.2/audits?$filter=objecttypecode%20eq%20%27myissuetable%27%20and%20_objectid_value%20eq%20%271de46d6b-b986-f111-ab0e-001dd80b339b%27&$select=_objectid_value,objecttypecode,changedata,createdon,_userid_value
but when i use the invoke http from power automate it says unauthorized.
i am using the same account. What is the issue
is there anything i need to do so that it works?
1 Reply
- AmezingtechsataraIron Contributor
The browser and the flow aren't doing the same thing, even with the same account. When you paste that URL into the browser, you're already signed in — the browser sends along your Dataverse session, so the API sees an authenticated user. The HTTP action in Power Automate sends nothing unless you tell it to, so Dataverse answers 401. Microsoft's Dataverse Web API documentation is explicit that every call has to carry an OAuth 2.0 access token.
The quickest fix is to stop using the raw HTTP action for this and use the built-in Microsoft Dataverse connector instead — a List rows action on the audits table does the same query and handles the sign-in for you.
If you'd rather keep the HTTP action, give it credentials: set Authentication to Active Directory OAuth, with the tenant, the audience set to your environment URL (https://my365.crm9.dynamics.com), and a client ID and secret from an app registration in Entra ID that has access to Dataverse. One more thing to check after that: reading the audits table needs the audit privilege on the account the token belongs to, so if the 401 turns into a 403, that's the next place to look.