Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested answer

Use Postman to create cases in Dyn365

(0) ShareShare
ReportReport
Posted on by 57

All smart people - I lean on you for your knowledge and wisdom .  I'm new to Dyn365 and Postman.  I'm attempting to use Postman to create a case and submit into Dyn365 via web api.  Has anyone ever done this?  

jlattimer I found your response to a similar post - Web API Create a new case - Web API - Create new case - Microsoft Dynamics CRM Forum Community Forum, but the life of me, I can't get the 'plumbing' setup in Postman to appropriately create the case.  

Thank you - Peter Ramer 

Step 1: I have configured Postman to call D365 Data Entities - Use Postman To Call D365 Data Entities - Dynamics 365 Musings - Receiving Status 200 Ok

Step 2: I have t up Postman to call D365 Data Entities - Setup Postman To Call D365 Data Entities - Dynamics 365 Musings - Receiving Status 200 Ok

pastedimage1646765087852v1.png

Thank you in advance for your consideration and time.

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,961 Moderator on at
    RE: Use Postman to create cases in Dyn365

    Hi,

    Yes, you can still make call to your web service to create case in dataverse.

    You can also extend your trial instance for another 30 days OR you can create new trial instance.

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • JMaye2 Profile Picture
    JMaye2 57 on at
    RE: Use Postman to create cases in Dyn365

     Bipin Kumar - I wanted to say thank you all of your help.  I think I'm still missing some things and not following.  

    Simply put- how do I create a case via Postman?

    It seems that my customer self service portal has expired, but my DYN365 environment is still valid for a few more days.  Do I need the customer self service portal up and running so I can make the calls into the web page.

    pastedimage1647265646648v1.png

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,961 Moderator on at
    RE: Use Postman to create cases in Dyn365

    Hi,

    Make sure you have selected correct environment from dropdown on top right. Also please select All as shown in below image.

    CR83.PNG

    I hope you have created Application user in your dynmaics crm instance based on Azure App ID and assigned appropriae role to it.

    What is the grant type you are using in Body of Get Access token?

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • JMaye2 Profile Picture
    JMaye2 57 on at
    RE: Use Postman to create cases in Dyn365

    Thank you for the information related to 'not using the correct field name'.  I will try to get it to work with 'accountid'

    When you state, check your field name and data type in maker Portal, https://make.powerapps.com/, I think I'm following you with respect to the Dataverse -> Tables, correct?  When I view the Table lists of items, I do not see Case, I see Account which I believe is what you are suggesting I use before I create a case as a case requires an account to be associated with it, right?

    pastedimage1646930126774v2.png

    Register Azure AD Portal Application - has been done and I have the Application (client)Id, the Object ID, Directory (tenant) ID successfully.  I referenced the values in the picture above, but I removed the values from the picture for this post.  

    pastedimage1646926167260v1.png

    The https://xxxxxx.xxxxxx.dynamics.com/api/data/v9.2/.default (the .default) extension is just a placeholder b/c the incidents were not working.  What I'm not getting is what should it be?

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,961 Moderator on at
    RE: Use Postman to create cases in Dyn365

    Hi,

    You are not passing the correct field name in Body raw. You don't need to prefix the field name with incident.

    So incidentaccountid should be accountid only. incident prefix is not required.

    You should check your field name and data type in maker portal https://make.powerapps.com/

    Different data type value should be passed in different format. please see sample code from below pages

    docs.microsoft.com/.../create-entity-web-api

    Also, please show me the request body for access token request. Are you using client crede flow or User cred flow to get the access token. You should also assign role to your user.

    docs.microsoft.com/.../walkthrough-register-app-azure-active-directory

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • JMaye2 Profile Picture
    JMaye2 57 on at
    RE: Use Postman to create cases in Dyn365

    Thanks for the information Bipin.  I think we're getting close.

    Here's what I have-

    I get the Access Token and then I variabilize it into the key "Authorization Bearer{{access_token}}

    pastedimage1646845744611v1.png

    I can check this by "eye"  Environment Quick Look"

    pastedimage1646845808579v2.png

    I have also taken Access token and inserted into the Authorization area and I'm getting the 401 Unauthorized error

    pastedimage1646845981520v3.png

    Per your suggestions, I have setup customer entities like below-

    pastedimage1646846169018v4.png

    I appreciate your assistance.  Not sure what I'm doing wrong here.

    Thank you again.

    Jack

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,961 Moderator on at
    RE: Use Postman to create cases in Dyn365

    HI,

    Did you create a custom entity for ims_loanstagings?

    Yes, I have taken the snap for my custom entity. You will need to modify entity name to incidents.

    How did you determine the required IDs listed in the RAW field (in your picture?)

    I am mapping fields/columns based on my custom entity fields.

    Please see below reasons of 403 Forbidden Expect this for the following types of errors:

    - AccessDenied

    - AttributePermissionReadIsMissing

    - AttributePermissionUpdateIsMissingDuringUpdate

    - AttributePrivilegeCreateIsMissing

    - CannotActOnBehalfOfAnotherUser

    - CannotAddOrActonBehalfAnotherUserPrivilege

    - CrmSecurityError

    - InvalidAccessRights

    - PrincipalPrivilegeDenied

    - PrivilegeCreateIsDisabledForOrganization

    - PrivilegeDenied

    - unManagedinvalidprincipal

    - unManagedinvalidprivilegeedepth

    docs.microsoft.com/.../compose-http-requests-handle-errors

    Could you please share screenshot of Body->raw fields mapping for your request?

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • JMaye2 Profile Picture
    JMaye2 57 on at
    RE: Use Postman to create cases in Dyn365

    Thanks Guido, but we don't want to use another tool if we don't have to.

    Bipin - thank you for the suggestion.

    Please excuse my elementary questions (I'm still new to learning)-  

    I see that you have a POST going out to xxxx.xxxx/.../ims_loanstagings.  

    1. Did you create a custom entity for ims_loanstagings?
    2. How did you determine the required IDs listed in the RAW field (in your picture?)

    Per the documentation located here-docs.microsoft.com/.../incident, the Web API operation for the Incident Entity reference for Create is POST [org URI/api/data/v9.x/incidents.  

    I'm attempting to POST to that URL xxxxxxxxxxxx.api.crm.dynamics.com/.../incidents, but I'm getting a 403 Forbidden. (Your efforts helped me to remedy the 401, but now I'm getting a 403.

    The full scenario is as such:

    I'm attempting to use Postman to establish a connection to the appropriate entity(endpoint) and then insert the required fields (CreateOn, Account, alias, etc) into Postman to then create a case.  That case will then post into the Dyn365 list of cases similar to a web case that is performed from the default Dyn365 Self-Service Portal.

    Does that make sense?  Is this feasible?  

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,961 Moderator on at
    RE: Use Postman to create cases in Dyn365

    Hi,

    You need to create POST request as shown below for one of my custom entity. You can modify instance URL,,Entity name and Body json fields mapping.

    CR71.PNG

    You would need to pass access token generated from Get Access Token request -

    CR72.PNG

    Your entity name would be "incidents" for case.

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • Guido Preite Profile Picture
    Guido Preite 54,073 Moderator on at
    RE: Use Postman to create cases in Dyn365

    you can use my tool Dataverse REST Builder (link to download in my signature) to create the request you need (in your case creation of a Case).

    After you can export the collection to Postman and import it.

    In order to make the request to be executed inside Postman or you use the grant type implicit (as explained inside this Docs page) or client credentials (but you need to setup an app registration in order to access the data, a tutorial can be found here)

    hope it helps

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans