Click here to Skip to main content
15,884,917 members
Articles / DevOps
Tip/Trick

Share Pay-As-You-Go Subscription from One User to Group

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
8 Oct 2018CPOL3 min read 3.5K  
Share the one subscription between group of users and control it from one account

Introduction

For training purposes, I had to solve the following task: I needed to create a new organization inside Azure, become its administrator and add my coworkers as users that can use this new account to play with Azure. Task seems not so complicated, but I didn't find a good description of how to do this, so I decided to create my own one.

Solution

  1. First of all, I created a new account in Azure, this account is Global Administrator for my Azure Active directory, that is default BTW:

    Image 1

  2. I've created a Pay-As-You-Go subscription for my account, it was automatically connected to my Active Directory. Note the subscription may connect only to one AD, while AD can have multiple subscriptions connected.

    From subscription page in "Access Control" section, I've invited my coworker\s to work with it: I gave "Contributor" role to my coworkers, but it can be anyone you decide to use. Same for "Assign access to" I used default value, that can be changed according to your needs.

    Image 2

    Next step is you enter user mail for the person you want to invite to your subscription and press "Save". User will receive notification to his mail with the request to join your default Active Directory. Note: User joins your active directory as a guest as well, not your subscription only. You can first invite this user to your active directory and then from there to your subscription, but in my case, I did it from subscription. As you can see in my AD users, I see new user:

    Image 3

    As you can see, you can invite any user to your active directory and subscription. This shouldn't be a necessary user from your organization. We achieve this great flexibility due to B2B collaboration capabilities. You can first add such users from your Active Directory management and then share with them subscription only.

  3. Once you added you user to subscription and AD, he will receive email with invitation:

    Image 4

  4. When your invited user logs in to Azure Portal, he might have other directories to which he belongs to. To be able to work with your subscription and active directory, this user needs to switch to your directory and then he will be able to use and see your subscription:

    Image 5

  5. Now let's try to create a new SQL DB from the account of the user that was invited:

    Image 6

    As you can see, it used Pay-As-You-Go subscription.

  6. Now let's go back to my original user and here we can see the newly created DB as well:

    Image 7

    My original account will show all the resources from all the users inside the organization I just created.

  7. Finally, after one month of usage, this DB is under my invited user, my original user received the payment request for this resource inside Pay-As-You-Go subscription:

    Image 8

    The exact same picture I can see from my guest user.

  8. From my root account, I've tried and successfully deleted resource that was created by my guest account.

In conclusion, Microsoft Azure gives us very flexible ability to create organization under specific account and share its subscription to guest users. By having that, we can control expenses from one place.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
Ukraine Ukraine
Working on different projects and technologies from web to low level core programming, from scripting languages to C++. With all this stuff my personal opinion is that C#,.NET and Microsoft environment is the best thing programmer may have. Basing on it I prefer to publish only about my favorite technologies that are .NET and Azure now.

P.S. Looking for partnership and cooperation in outsourcing.

Comments and Discussions

 
-- There are no messages in this forum --