Search code examples
azuredynamics-crmpowerappspower-automatedataverse

Dataverse user error while requesting data through the API


I'm trying to request data from the Dataverse through the API.

I did the following:

  1. I created an application in Azure with the respective API permissions and generated a secret.
  2. Using OAuth, I got the bearer token in order to authorize my requests using the client secret grant_type=client_credentials.
  3. When I make a request I get the following error, "The user is not a member of the organization.".

I'm not sure how to add the "Azure App user" to the environment because there is none.

Also, I can successfully make the request if I get the bearer token using user/password, grant_type=password, where this user is in the power apps environment.

Any idea on how can I solve this?


Solution

  • Ok,

    I found the answer through this post, I am not able to connect to dataverse API through Logic Apps - Error: "The user is not a member of the organization."

    We need to add the created azure application in the Application Users menu (Enviorment -> Settings -> Users + permissions -> Application Users)

    Thank you!