Announcements
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
Hi Jose,
Have you already checked that the user associated with application id in D365 is enabled and has needed rights?
Did you get AAD token correctly?
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.
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?
You need to register the Client app id in D 365 under "Azure Active Directory applications"
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
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.
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.
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
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.
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 428 Super User 2026 Season 1
Subra 370
Martin Dráb 283 Most Valuable Professional