The first priest to marry his same-sex partner is to issue a legal challenge to the Church of England after his offer of a job as an NHS chaplain was withdrawn when his bishop refused the necessary permission.

The Rev Jeremy Pemberton, who married Laurence Cunnington in April, was informed on Friday that Sherwood Forest Hospitals NHS trust had withdrawn its offer of a job after Bishop Richard Inwood had refused him the official licence in the diocese of Southwell and Nottingham.

"It this is not challenged," Pemberton said on Sunday, "it will send a message to all chaplains of whom a considerable number are gay and lesbian. This is an area of law that has not been tested and needs to be."

Anglican clergy are allowed to enter civil partnerships, but the House of Bishops has forbidden them to marry their same-sex partners, at least until a two-year discussion process within the church has been completed.

But the legal process for disciplining clergy who do so is unclear and has not been tested. Supporters of gay marriage claim it is a doctrinal issue, which is cumbersome and difficult for the church to prosecute. Opponents claim it is merely a matter of conduct, for which a simpler legal process exists.

Pemberton's case suggests that some bishops hope to deal with the matter by ensuring that no one who marries their same-sex partner will ever find another job.

"It is tragic and disappointing that bishops think they can get away with this," Pemberton said. "I have not been through any disciplinary process."

The matter is complicated because Pemberton, who lives in Southwell and sings in the minster there, already has a job as a hospital chaplain in the neighbouring diocese of Lincoln. He had been hoping to move his work closer to home.

The bishop of Lincoln, the Rt Rev Christopher Lowson, has made no moves against Pemberton.

Lincoln is in the ecclesiastical province of Canterbury, and the archbishop of Canterbury, Justin Welby, has let it be known that he will leave individual cases to the bishops involved. But Southwell and Nottingham is in the province of York, and the archbishop of York, John Sentamu, has been a vociferous opponent of gay marriage.

Inwood's statement said he made his decision after consultation with Sentamu.

The gay rights campaigner Peter Tatchell has threatened to out gay bishops, whom he accuses of being complicit in the persecution of other gay men. He last did so in 1994, naming, among others, the then archbishop of York, David Hope, who responded by saying his sexuality was "a grey area". But negotiations between gay clergy groups and senior bishops were opened within days of Tatchell's demonstration.

• This article was amended on 4 and 5 August 2014 to correct an error about licensing requirements and the spelling of the Rt Rev Christopher Lowson's name.