Azure AD Schema extension with Graph Api RRS feed

  • Question

  • I am trying to extend Azure AD Directory to add custom field(skypeID) for a user object, for reference i just implemented with PostMan

    Step1: Generated code for the app using https://login.windows.net/xyz.onmicrosoft.com/oauth2/authorize endpoint 

    Step2: With client_id, key, code i am generating bearer token using https://login.microsoftonline.com/common/oauth2/token endpoint

    Step3: using token i am calling http://graph.windows.net/xyz.onmicrosoft.com/applications/<appobjectid>/extensionProperties?api-version=1.5 with body parameter {"name": "skypeId",  "dataType": "String","targetObjects": ["User"]

    here i am not getting any response. i just followed Directory Extension document.

    could you please help me that i am missing any thing here or the any other auth param i need to pass.

    Thank you,


    Thursday, October 12, 2017 1:30 PM

All replies

  • I am sending request same as above, today i am getting error as "Authentication_MissingOrMalformed".

    Could any one please help me, i am sending a valid access token.

    Friday, October 13, 2017 6:35 AM
  • You need to create an authorization header like this:
    $headerParams  = @{'Authorization'="$($oauth.token_type) $($oauth.access_token)"} 
    Then make the call to the API
     $restult = Invoke-WebRequest -Uri $uri -body $body -headers $headerParams

    Or simply in your request the token must be present as a request header like this:
    Authorization: Bearer eyJ0eXAiOiJKV1QiLCJh......
    $restult = Invoke-WebRequest -Uri $uri -body $body -headers $headerParams -method POST
    Do click on "Mark as Answer" on the post that helps you and vote it as helpful, this can be beneficial to other community members.
    • Proposed as answer by vijisankar Monday, October 16, 2017 4:31 PM
    Monday, October 16, 2017 4:31 PM