AppRole Creation using Graph API

S, Chandra Mohan 20 Reputation points
2024-06-14T05:28:54.93+00:00

Hi Experts,

The MS document for appRole creation json body is expecting a GUID, could someone please help what is the GUID to be given here.

{

"allowedMemberTypes": ["String"],

"description": "String",

"displayName": "String",

"id": "Guid",

"isEnabled": true,

"origin": "String",

"value": "String"

}

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,404 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 40,226 Reputation points
    2024-06-14T06:27:24.7033333+00:00

    Hi @S, Chandra Mohan

    It can be any valid GUID, which requires you to customize its value, but it must conform to the GUID format.

    For example:

    "id": "00000000-0000-0000-0000-000000000000", // Replace with a valid GUID
    

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Vasil Michev 100.1K Reputation points MVP
    2024-06-14T06:28:52.6933333+00:00

    If you are creating a new role, the ID value would be a GUID you generate. Otherwise, provide the GUID of existing role (do make sure to include all existing ones in your request, as it effectively overwrites the manifest).

    1 person found this answer helpful.
    0 comments No comments

  2. Adharsh Santhanam 2,705 Reputation points
    2024-06-14T07:02:44.6+00:00

    If you're creating a new AppRole entirely, then, this is purely a random GUID that you can generate using any method (in a format similar to the other AppRoles already present in your tenant) and assign it to the "id" field.

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.