Share via

MS Graph sdk go lang subscription mail

Srinivas Dodamani 1 Reputation point
2022-08-16T12:13:31.69+00:00

(Error creating subscription: error status code received from the API)

Q.
What am i doing wrong here?
note 1: Application has all needed (mail) permission.
note 2: MS GRAPH sends validation token to endpoint

sorry: need to post multiple times as i am having some weird issues with ms Q&A

Microsoft Security | Microsoft Graph
0 comments No comments

2 answers

Sort by: Most helpful
  1. Srinivas Dodamani 1 Reputation point
    2022-08-16T12:19:37.437+00:00

    [ code for end point validation ]
    func handle_validation_token(rsp http.ResponseWriter, req *http.Request) {
    token := req.RequestURI
    token1 := strings.Split(token, "=")

    encodedValue := token1[1]
    decodedValue, err := url.QueryUnescape(encodedValue)
    if err != nil {
    log.Fatal(err)
    return
    }
    fmt.Println("decoded value=", decodedValue)
    fmt.Println("encoded value=", encodedValue)

    io.WriteString(rsp, decodedValue)
    }

    Was this answer helpful?

    0 comments No comments

  2. Srinivas Dodamani 1 Reputation point
    2022-08-16T12:18:02.147+00:00

    from MS GRAPH
    validationToken=Validation%3a+Testing+client+application+reachability+for+subscription+Request-Id%3a+5731e5c5-096b-867f-5fd1-b1fc2e93c359

    End point response (End point validation step)

    Validation%3a+Testing+client+application+reachability+for+subscription+Request-Id%3a+5731e5c5-096b-867f-5fd1-b1fc2e93c359

    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.