no subscription found for function during azure cli login

Wilko Odijk 41 Reputation points
2022-02-16T20:24:15.747+00:00

hi there, trying to login to an azure function using the azure cli command:

175059-image.png

az login --service-principal --username 76cd0572-51eb-45cd-b10f-714ae9244565 --tenant a7be93f8-3acb-4d50-bf93-8d3b2a96d86b --password "password"

giving:

No subscriptions found for 76cd0572-51eb-45cd-b10f-714ae9244565.

However, the azure function has a valid subscription. How can i see what is going wrong here?

Thanks,

Wilko

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

Accepted answer
  1. Manu Philip 20,206 Reputation points MVP Volunteer Moderator
    2022-02-17T09:15:12.17+00:00

    The login failure seems like connected to an IAM privilege in the subscription.
    In Azure portal, connect the subscription blade. Go to Access Control (IAM) as shown and add a Role assignment for the service principle in the subscription. This should fix the issue as I think

    175316-image.png

    ----------

    If the Answer is helpful, please click "Accept Answer" and upvote it

    7 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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