Assign Security Role to team and user through rest api in MS CRM

Today i needed to assign security role to team and user using rest api through postman: Below is the sample request:- Assign role to team Method : Post Url: https://yourceinstancename.api.crm9.dynamics.com/api/data/v9.1/teams(teamguid)/teamroles_association/$ref Body: {"@odata.id":"https://yourceinstancename.api.crm9.dynamics.com/api/data/v9.1/roles(roleguid)"} 2. Assign role to user Method : Post Url: https://yourceinstancename.api.crm9.dynamics.com/api/data/v9.1/systemusers(systemuserguid)/systemuserroles_association/$ref Body: {"@odata.id":"https://yourceinstancename.api.crm9.dynamics.com/api/data/v9.1/roles(roleguid)"} Just replace yourceinstancename, teamguid , systemuserguid , roleguid as per your... Continue Reading →

Query D365 CE from console app using azure ad app using client credentials – (Server to server authentication using azure ad and application user for Dynamics 365 ce)

To query ce from outside ce using webapi, follow below steps:-   Prerequisites :- Azure ad application with secret generated (Azure Subscription should be with same Office 365 account as of your D365 instance-you can login to azure using your ce trail instance credentials) (Ref ms docs) 2. Application user created in ce with same... Continue Reading →

How to add new option set value in global option set using webapi in Dynamics 365 ce

I was trying to found out how we can add a new value to a global option set and below post request can do the same : https://vgrade2.api.crm8.dynamics.com/api/data/v9.1/InsertOptionValue { "OptionSetName": "new_test", "Label": { "LocalizedLabels": [ { "Label": "anewoptionsetlabel", "LanguageCode": 1033 } ] } } Output: { "@odata.context": "https://vgrade2.api.crm8.dynamics.com/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.InsertOptionValueResponse", "NewOptionValue": 100000005 } Be default it put... Continue Reading →

Blog at WordPress.com.

Up ↑