Share via

Create assignment with `notificationChannelUrl` return error 400(20243 Notification channel url is invalid)

Bruno (IT) 21 Reputation points
2022-02-16T04:36:28.847+00:00

We can using the Education Graph API to create an edit assignments without "notificationChannelUrl" in request body.

Then we using endpoint: https://learn.microsoft.com/en-us/graph/api/resources/educationassignment?view=graph-rest-1.0#properties
to set the request body with notificationChannelUrl, and now return bad request with following error message.

error:{"code":"20243","message":"Invalid request body. Notification channel url is invalid."

API usage process:
1, use https://graph.microsoft.com/v1.0/teams/{eam-id}/channels, then get the channel list with ["webUrl"]=>
string(201) "https://teams.microsoft.com/l/channel/19%3azP ... ...,

  2, create assignments with "notificationChannelUrl": webUrl,   

The question is: What url string I can set for notificationChannelUrl?

Thank you very much!

Microsoft Security | Microsoft Graph
0 comments No comments

Answer accepted by question author

CarlZhao-MSFT 46,456 Reputation points
2022-02-16T06:47:06.46+00:00

Hi @Bruno (IT)

The notificationChannelUrl is not a hyperlink to the channel but the graph api used to get the channel.

"notificationChannelUrl": "https://graph.microsoft.com/v1.0/teams/{team-id}/channels/{channel-id}"  

If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-03-27T17:05:52.313+00:00

    Was this answer helpful?

    0 comments No comments

  2. Bruno (IT) 21 Reputation points
    2022-02-16T09:47:23.73+00:00

    Hi @CarlZhao-MSFT ,
    Thanks for your quickly reply. And the answer is very helpful.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.