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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Associating web role record while creating contact

(0) ShareShare
ReportReport
Posted on by 111

In my req I have to create a Contact and associate it  with web role, with two web api call I'm able to achieve it,

For Creating Contact:

STEP 1

api/data/v9.1/contacts

{
"lastname" : "asdf test with role 3",
"emailaddress1": "asdf@asdf"
}

and then I'm associating Contact rec with existing webrole

STEP 2

api/data/v9.1/contacts(New record guid)/adx_webrole_contact/$ref

{
"@odata.id":"---/api/data/v9.1/adx_webroles(webroleguid)"
}

It seems they have N:N relationship

Can we combine both call like in single webapi call

I have the same question (0)
  • Ahtesham Profile Picture
    111 on at

    I'm able to achieve it with below

    /api/data/v9.1/contacts

    {

    "lastname" : "asdf test with role 5",

    "emailaddress1": "asdf@asdf",

    "adx_webrole_contact@odata.bind":

      [          "/adx_webroles(GUID OF WEB ROLE)"

      ]

    }

  • Suggested answer
    Charles Abi Khirs Profile Picture
    3,569 on at

    Hello,

    You can automatically assign  a webrole to a contact using a workflow and the built-in custom action portals > assign web role.

    Check this link for detailed steps: community.dynamics.com/.../automatically-assign-webrole-to-the-contacts-in-crm-portals

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

#2
ManoVerse Profile Picture

ManoVerse 55 Super User 2026 Season 1

#3
11manish Profile Picture

11manish 37

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans