0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Azure Pipelines: Service Connection 作成時、Microsoft.Resources/subscriptions/read 不足なら、Role を割り当てる

Posted at

背景

はじめて Service Connection を作ったころに嵌った記録

現象

  • ARM で Service connection が作成出来ない。verify error になって、以下のえらーとなる。
    • ARM: Azure Resource Manager

Failed to query service connection API: 'https://management.azure.com/subscriptions/{subscription id}?api-version=2016-06-01 '. Status Code: 'Forbidden', Response from server: '{"error":{"code":"AuthorizationFailed","message":"The client '{client id}' with object id '{object id}' does not have authorization to perform action 'Microsoft.Resources/subscriptions/read' over scope '/subscriptions/{subscription id}' or the scope is invalid. If access was recently granted, please refresh your credentials."}}'
ActivityId: {activity id}

原因

上記文章に書かれている通り、Microsoft.Resources/subscriptions/read が無い。

ということで、Azure Portal 側で、割り当てようとしてた Service Principal に対して、Microsoft.Resources/subscriptions/read を持つ Role を割り当ててやればよい。

もちろん、カスタムロールを作成してもOK

あとがき

RBAC すらもまだ理解していなかった頃であり

  • アクセス権が無い=アプリ登録時になにか設定不足だった?

と考えて詰まっていた。

というのも、会社でやろうとしていて、アプリ登録は書類申請だった為に、試行錯誤の前に調べないとダメだったから、非常に悩んだ思い出・・。
理解する為にも、試行環境が欲しいなぁと、思っていた。今は VS Subscription の環境があるので助かる

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?