web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Issue testing GET OData request on Postman

(1) ShareShare
ReportReport
Posted on by 140

Hi all

I have been following the steps of the blog:

https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/third-party-service-test

I get the bearer Token from the first POST request, but when I try to send the request to get the data, I'm getting the next response

{
    "Message""Please verify that the user is valid and set up correctly."
}
The only difference between the example and my request is that Postman automatically set some "hidden headers"
pastedimage1596693075080v1.png
pastedimage1596693112381v2.png
If anyone could suggest some sollution
Thanks in advance
Jose
I have the same question (0)
  • Sergei Minozhenko Profile Picture
    23,097 on at

    Hi Jose,

    Have you already checked that the user associated with application id in D365 is enabled and has needed rights?

  • WillWU Profile Picture
    22,363 on at

    Hi Jose,

    Did you get AAD token correctly?

    pastedimage1596705030718v1.png

    Client Id: The ID of the AAD application that you created in Azure AD.

    Client Secret: The key configured when creating the AAD application.

    Resource: The url of D365FO but without the slash (/) at the end.

    Hope this helps.

  • Pete Alberts Profile Picture
    3,546 on at

    This means some of your setup in AAD or on the F&O environment is not correct. Did you remember to register the app in the AX environment?

  • Suggested answer
    vinitgoyal2005 Profile Picture
    6,332 on at

    Hi Jose,

    You need to register the Client app id in D 365 under "Azure Active Directory applications"

    pastedimage1596725084271v2.png

    pastedimage1596725054176v1.png

  • Suggested answer
    Deekshit Addepalli Profile Picture
    Microsoft Employee on at

    In your D365 environment, go under System Administration-> Setup -> Azure Active Directory Applications. Your client ID needs to be added here and the user should match the user you are attempting to run postman with. Since postman usually runs as the windows logged in user, make sure that userid is setup as the user in the Azure AD Applications screen in Dynamics and is a valid Dynamics user

  • Jose Fuentes Profile Picture
    140 on at

    Thanks to everyone for the suggestions

    The application has been already registered in AAD and it has been added in Dynamics.

    The purpose was explain to Non-.Net Developers how could test these services.

    I think there is something wrong in Postman because when I tested the request in a .net console application it worked fine.

                string GetUserSessionOperationPath = string.Format("{0}/data/Customers", ClientConfiguration.Default.UriString.TrimEnd('/'));
    
                var request = HttpWebRequest.Create(GetUserSessionOperationPath);
                //the first request to get the access token
                request.Headers[OAuthHelper.OAuthHeader] = OAuthHelper.GetAuthenticationHeader();
    
                using (var response = (HttpWebResponse)request.GetResponse())
                {
                    using (Stream responseStream = response.GetResponseStream())
                    {
                        using (StreamReader streamReader = new StreamReader(responseStream))
                        {
                            string responseString = streamReader.ReadToEnd();
    
                            Console.WriteLine(responseString);
                        }
                    }
                }

    Regards.

    Jose Fuentes.

  • Suggested answer
    Sukrut Parab Profile Picture
    71,741 Moderator on at

    I tried   doing get request through postman and it works fine . Make sure  when you  do app registration grant permission to dynamics ERP.  Also when you get the bearer token make sure not to include / and last thing registering app ID in D365. Once you have these you should be able to get response 200.

  • Tommy S Jensen Profile Picture
    50 on at

    Jose Fuentes, did you manage to solve the issue "Message""Please verify that the user is valid and set up correctly.". I have the same issue in both Postman and a Logic App. I have made an app registration

  • Suggested answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

    Hi Tommy,

    if you're using app id and secret to authenticate, you need to link the app id to an user account in D365FO Azure Active Directory Applications form, as discussed above. At least in your description you didn't mention having set it up.

  • Tommy S Jensen Profile Picture
    50 on at

    In case I made a mistake in the first one, I just made a new registration. But got the same error. I have added it to D365FO Azure Active Directory Applications form and added the 3 API permissions. I am not sure if a redirect URL is needed for this. For testing the registration in D365FO is setup to my own account with admin rights.

    In a browser I am able to execute the OData operation https://[myEnv]devaos.cloudax.dynamics.com/data/Customers, but that is of cause with my credentials and not by the use of a secret key/token.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2026 Season 1

#2
Subra Profile Picture

Subra 370

#3
Martin Dráb Profile Picture

Martin Dráb 283 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans