<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>James Evans | EduTech</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/edutech/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/edutech/feed.xml</link>
    <description>Sr. Embedded Escalation Engineer - Azure Active Directory Embedded Engineering Team</description>
    <lastBuildDate>Tue, 30 Jan 2018 17:06:48 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Script - Bulk Assign Users to Azure AD SaaS Applications</title>
      <link>https://docs.microsoft.com/archive/blogs/edutech/script-bulk-assign-users-to-azure-ad-saas-applications</link>
      <pubDate>Tue, 20 Dec 2016 18:48:16 GMT</pubDate>
      <dc:creator><![CDATA[Jas Suri]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/edutech/?p=5355</guid>
      <description><![CDATA[Today we present a convenient PowerShell module which allows management of User Assignments to Azure...]]></description>
      <content:encoded><![CDATA[Today we present a convenient PowerShell module which allows management of User Assignments to Azure AD SaaS and Web Applications. This can be quite a task for administrators so this may be a great alternative to manual assignment. Assignments can be made to users and groups, however for long term management I would recommend using Azure AD Premium to carry out operations such as this.
<h3>Pre-Requisites</h3>
<ol>If we are to assign users to a Saas App: Prepare a CSV with user UPNs populated in a single column headed: UserPrincipalName.
If we are to assign groups to a Saas App: Prepare a CSV with group ObjectID’s populated in a single column headed: ObjectID.
Assign a single User/Group access to the SaaS app via the Azure Portal.</ol>

<h3>How To:</h3>
This module leverages the existing Azure AD V2 cmdlets which make use of the Graph API.

To install the module - In PowerShell run:
<pre>Install-Module -Name AzureAD</pre>
&nbsp;

Download the PowerShell Module which will be used to automate the permissions assignment.
<blockquote><a href="https://msdnshared.blob.core.windows.net/media/2016/12/bulkSaaSAppAssignment.zip">Bulk Assignment PowerShell Module</a></blockquote>
Import the bulkSaaSAppAssignment PowerShell Module:
<pre>Import-Module c:\path\bulkSaaSAppAssignment.psm1</pre>
&nbsp;
<h4><strong>Obtain the details of the SaaS Application we would like to assign users permissions to</strong></h4>
In PowerShell run:
<pre>Connect-AzureAD</pre>
Login with the credentials of the Global Administrator of the target Azure Active Directory.

Search for the ServicePrincipal which holds permission information for your SaaS Application:
<pre>Get-AzureADServicePrincipal -SearchString "salesforce" | fl displayname, objectid</pre>
The output will look similar to this:

<ol>DisplayName : Salesforce
ObjectId    : a119cf6c-1ea1-4447-a160-b195ba36efb7</ol>
&nbsp;
<h4><strong>Obtain information about the RoleID for the assignment operation</strong></h4>
We will obtain the roleID which represents the type of role used for the App Assignment. You will need to supply the UPN of a user which already has been assigned access via the Azure Portal and the ObjectID of the ServicePrincipal for the SaaS App obtained earlier:
<pre>Get-RoleID -UserPrincipalName first.last@contoso.com -ObjectID a119cf6c-1ea1-4447-a160-b195ba36efb7</pre>
<ol>The RoleID is: 073e08e5-5451-4628-82e6-15a9aa569e7c</ol>
&nbsp;

In some cases the RoleID is not required to assign users access to the App – here the output will be as follows:
<ol>
The RoleID is: 00000000-0000-0000-0000-000000000000
RoleID does not need to be specified for this user-application assignment.</ol>
&nbsp;

The command <code>Get-GroupRoleID</code> can be used for Group management. It requires the Group ObjectID and the ServicePrincipal ObjectID.
<pre>Get-GroupRoleID -Group "group objectID" -ObjectID a119cf6c-1ea1-4447-a160-b195ba36efb7</pre>
&nbsp;
<h4><strong>Assigning Access</strong></h4>
In all the following User/Group Assignment commands, provide the file path to the CSV and the ObjectID of the ServicePrincipal of the SaaS app obtained earlier.
In a case where a RoleID was returned from Get-UserRoleID/Get-GroupRoleID, then also provide the RoleID GUID when assigning access to a SaaS App for the following commands with the <code>-RoleID</code> flag.

The CSV requires a single heading: "UserPrincipalName", and all UPNs listed below it.

<h4>Bulk assign access to Users:</h4>
<pre>New-AzureADBulkUserAppAssignment -File "Path to CSV" -ObjectID a119cf6c-1ea1-4447-a160-b195ba36efb7 -RoleID 073e08e5-5451-4628-82e6-15a9aa569e7c</pre>
&nbsp;
<h4>Bulk assign access to Groups</h4>
<pre>New-AzureADBulkGroupAppAssignment -File "Path to CSV" -ObjectID b9c12220-93af-433b-89dc-f441e79f2470</pre>
&nbsp;
<h4>Bulk remove access to Users</h4>
<pre>Remove-AzureADBulkUserAppAssignment -File "Path to CSV" -ObjectID a119cf6c-1ea1-4447-a160-b195ba36efb7</pre>
&nbsp;
<h4>Bulk remove access to Groups</h4>
<pre>Remove-AzureADBulkGroupAppAssignment -File "Path to CSV" -ObjectID b9c12220-93af-433b-89dc-f441e79f2470</pre>
&nbsp;

This work has been built from the experience of my colleague James Evans and Dushyant Gill from the engineering team who initially blogged in regards to Azure AD Graph API and SaaS App user assignment scripts.

Hopefully this will quickly facilitate the requirement of assigning users/groups to an Azure AD SaaS Application. However, for long term management and automation we should be using dynamic assignment based on group membership which requires Azure AD Premium.]]></content:encoded>
    </item>
    <item>
      <title>Azure AD Synchronized Users with Password Sync are unable to change password</title>
      <link>https://docs.microsoft.com/archive/blogs/edutech/azure-ad-synchronized-users-with-password-sync-are-unable-to-change-password</link>
      <pubDate>Sun, 03 Jul 2016 02:55:46 GMT</pubDate>
      <dc:creator><![CDATA[James Evans - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://www.edutech.me.uk/?p=5261</guid>
      <description><![CDATA[If you have recently started to here reports of users not being able to change there Azure AD /...]]></description>
      <content:encoded><![CDATA[If you have recently started to here reports of users not being able to change there Azure AD / Office 365 Passwords then you may want to continue reading;

Previously,

If an administrator set a user to Force c<span id="#h24" class="KeywordHighlight">hange</span> p<span id="#h25" class="KeywordHighlight">assword at next logon i.e. when they reset a user passwords it</span> allowed <span id="#h26" class="KeywordHighlight">password</span> synchornized users <span id="#h27" class="KeywordHighlight">to</span> <span id="#h28" class="KeywordHighlight">change</span> their cloud password and that updated password would not sync back <span id="#h30" class="KeywordHighlight">to</span> on-premises.  This in turn caused major issues for customers who relied on <span id="#h31" class="KeywordHighlight">password</span> synchronization <span id="#h32" class="KeywordHighlight">to</span> keep passwords in sync, because it effectively allowed users <span id="#h33" class="KeywordHighlight">to</span> set two different passwords in two different locations.

Users that are synchronized <span id="#h5" class="KeywordHighlight">to</span> Azure Active Directory are <span id="#h6" class="KeywordHighlight">unable</span> <span id="#h7" class="KeywordHighlight">to</span> '<span id="#h8" class="KeywordHighlight">Change</span>' or 'Update' <span id="#h9" class="KeywordHighlight">password</span> when '<span id="#h10" class="KeywordHighlight">Password</span> Sync' is enabled and "<span id="#h11" class="KeywordHighlight">Password</span> Writeback" has not been enabled or configured will now receive an error message like:
<blockquote>"Your Organization does not allow you <span id="#h18" class="KeywordHighlight">to</span> <span id="#h19" class="KeywordHighlight">change</span> your <span id="#h20" class="KeywordHighlight">password</span> on this site. Please <span id="#h21" class="KeywordHighlight">change</span> your <span id="#h22" class="KeywordHighlight">password</span> according <span id="#h23" class="KeywordHighlight">to</span> the method recommended by your organization, or ask your admin if you need help"</blockquote>
This is because we recently made a <span id="#h34" class="KeywordHighlight">change</span> <span id="#h35" class="KeywordHighlight">to</span> only allow users that are synchronized <span id="#h36" class="KeywordHighlight">to</span> Azure AD and are using <span id="#h37" class="KeywordHighlight">password</span> sync <span id="#h38" class="KeywordHighlight">to</span> <span id="#h39" class="KeywordHighlight">change</span> their passwords if the <strong><span id="#h40" class="KeywordHighlight">Password</span> Writeback</strong> feature is available. If a customer wants <span id="#h41" class="KeywordHighlight">to</span> update <span id="#h42" class="KeywordHighlight">password</span> sync’d user passwords from the cloud, he or she must use the <span id="#h43" class="KeywordHighlight">Password</span> Writeback feature.

Company Administrators should review the following documentation for <a href="https://azure.microsoft.com/en-us/documentation/articles/active-directory-passwords-getting-started/#writeback-prerequisites">Password Writeback Pre-Requisites</a> It is also important to ensure that you have purchased an <a href="https://azure.microsoft.com/en-us/pricing/details/active-directory/">Azure AD Premium Subscription </a>and the users have been assigned an <a href="https://azure.microsoft.com/en-us/documentation/articles/active-directory-licensing-what-is/#getting-started-with-azure-ad-licensing">Azure AD Premium License</a>.

Any customer who does not want <span id="#h56" class="KeywordHighlight">password</span> writeback, but wants users <span id="#h57" class="KeywordHighlight">to</span> be able <span id="#h58" class="KeywordHighlight">to</span> manage their own passwords, should convert those user accounts <span id="#h59" class="KeywordHighlight">to</span> managed user accounts such that they are no longer synchronized from on-premises.

If you have any questions please be sure to let me know,

Thanks,
James.]]></content:encoded>
    </item>
    <item>
      <title>Microsoft Azure B2B - Visual Studio Online</title>
      <link>https://docs.microsoft.com/archive/blogs/edutech/microsoft-azure-b2b-visual-studio-online</link>
      <pubDate>Tue, 29 Sep 2015 13:59:15 GMT</pubDate>
      <dc:creator><![CDATA[James Evans - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://www.edutech.me.uk/?p=4211</guid>
      <description><![CDATA[I am sure that you have heard that the Azure Active Directory Team have been hard at work and...]]></description>
      <content:encoded><![CDATA[I am sure that you have heard that the Azure Active Directory Team have been hard at work and recently placed Azure AD Business to Business (B2B) in to public preview, which enables organizations to share applications &amp; services that they currently use with external business guest / partners etc. and obtain your feedback prior to us placing this feature in to General Availability.

A common scenario in the developer world is where organizations connect Visual Studio Online with a Corporate Azure Active Directory, up until this feature release administrators have always had to manage Azure AD accounts for partners/business guests or have had to result in using Microsoft Accounts (Consumer Identities) which has always been frowned up on and for good reason to be honest, as consumer accounts should be avoided in the world of Business &amp; Enterprise!

More Information about Azure B2B can be found here: <a href="https://azure.microsoft.com/en-gb/documentation/articles/active-directory-b2b-collaboration-overview/">https://azure.microsoft.com/en-gb/documentation/articles/active-directory-b2b-collaboration-overview/</a>

In this article the aim is to show you how to configure Visual Studio Online to use Azure AD accounts that are created as part of you Inviting Partners / Business Guests in to your Azure AD. If you want to read further information about the feature as a whole, please refer to the link above.

Unfortunately it is early days at this moment in time, and so this particular deployment does require a bit of a 2 step process to get your external users using Visual Studio Online.
<h4>Obtain ApplicationID for Visual Studio Online {Login to AAD Connected to VSO}</h4>
<pre class="lang:ps decode:true">Connect-MsolService

Get-MsolServicePrincipal -ServicePrincipalName Microsoft.VisualStudio.Online</pre>
<img class="wp-image-4231 aligncenter" src="https://www.edutech.me.uk/wp-content/uploads/2015/09/SP_Grab.png" alt="SP_Grab" width="826" height="175" />
<h4>Create Invite CSV</h4>
<a href="https://www.edutech.me.uk/wp-content/uploads/2015/09/CSV_VSO.png"><img class="size-full wp-image-4291 aligncenter" src="https://www.edutech.me.uk/wp-content/uploads/2015/09/CSV_VSO.png" alt="CSV_VSO" width="1531" height="104" /></a>
<h4>Sample CSV file</h4>
Here is a sample CSV you can modify for your purposes. Save it to any file name you prefer, but ensure that it has a '.csv' file extension.
<pre>Email,DisplayName,InviteAppID,InviteReplyUrl,InviteAppResources,InviteGroupResources,InviteContactUsUrl
wharp@contoso.com,Walter Harp,cd3ed3de-93ee-400b-8b19-b61ef44a0f29,https://azure.microsoft.com/services/active-directory/,,,https://azure.microsoft.com/services/active-directory/
jsmith@contoso.com,Jeff Smith,cd3ed3de-93ee-400b-8b19-b61ef44a0f29,https://azure.microsoft.com/services/active-directory/,,,https://azure.microsoft.com/services/active-directory/
bsmith@contoso.com,Ben Smith,cd3ed3de-93ee-400b-8b19-b61ef44a0f29,https://azure.microsoft.com/services/active-directory/,,,https://azure.microsoft.com/services/active-directory/</pre>
<span style="color: #000000;font-family: Calibri"><strong>Email:</strong> Email address for invited user.
<strong>DisplayName:</strong> Display name for invited user (typically, first and last name).
<strong>InviteAppID:</strong>  The ID for the application to use for branding the email invite and acceptance pages.
<strong>InviteReplyURL:</strong> URL to which to direct an invited user after invite acceptance. This should be a company-specific URL (such as <a title="" href="https://contoso.my.salesforce.com/"><em>contoso.my.salesforce.com</em></a>). If this optional field is not specified, the inviting company's Access Panel URL is generated (this URL is of the form <code>https://account.activedirectory.windowsazure.com/applications/default.aspx?tenantId=&lt;TenantID&gt;</code>).
<strong>InviteAppResources:</strong> AppIDs to which applications can assign users. AppIDs are retrievable by calling <code>Get-MsolServicePrincipal | fl DisplayName, AppPrincipalId</code>
<strong>InviteGroupResources:</strong> ObjectIDs for groups to add user to. ObjectIDs are retrievable by calling <code>Get-MsolGroup | fl DisplayName, ObjectId</code>
<strong>InviteContactUsUrl:</strong> "Contact Us" URL to include in email invitations in case the invited user wants to contact your organization.</span>
<h4>Invite User Accounts</h4>
<ol>
	<li>Login to Azure Management Portal</li>
	<li>Select Active Directory &gt; Choose Directory that is linked to VSO &gt; Users &gt; Add</li>
	<li>Select “Users in Partners Companies” and upload CSV File that you created previously.</li>
</ol>
<img class="size-medium wp-image-4241 aligncenter" src="https://www.edutech.me.uk/wp-content/uploads/2015/09/Partner_Invite-300x257.png" alt="Partner_Invite" width="300" height="257" />
<h4></h4>
<h4>End User Experience</h4>
Each of the users that you sent out an invite to will get an e-mail like the following example:

<a href="https://www.edutech.me.uk/wp-content/uploads/2015/09/e-mail_invite.png"><img class="wp-image-4261 aligncenter" src="https://www.edutech.me.uk/wp-content/uploads/2015/09/e-mail_invite.png" alt="e-mail_invite" width="585" height="338" />
</a>

Once they click on the link, they will be taken to a page like the following example: [branding is my demo branding]

<a href="https://www.edutech.me.uk/wp-content/uploads/2015/09/Invite_Page.png"><img class="wp-image-4271 aligncenter" src="https://www.edutech.me.uk/wp-content/uploads/2015/09/Invite_Page.png" alt="Invite_Page" width="592" height="298" />
</a>

<strong>NOTE:</strong> In this scenario, you would normally configure the Reply URL to send the user to the application once accepted. In this instance I would recommend you sending the users to a static landing page stating that there account will be abled in X amount of time. The reason for this is because you will have to go and add the user to the VSO Permissions once the account has been created. Unfortunately there is no 'Sync' Between the Invite Process &amp; VSO Group Memberships and at the moment you can't add AAD Groups to VSO Groups which would of course make it more streamlined.

Once the invite has been accepted, as a collection admin you shall now be able to go and add the e-mail ID that you invited in to the relevant VSO Group. Once this has been done, the user will now be able to login to VSO using their Work Account and access your VSO Collection.
<h4>Add Users to Visual Studio Online Collection Group</h4>
<ol>
	<li>Login to VSO Admin Portal, Click Settings Cog &gt; Select Collection &gt; Security &gt; “Project Collection Administrators” &gt; Members &gt; Add</li>
</ol>
<a href="https://www.edutech.me.uk/wp-content/uploads/2015/09/Add_VSO_Collection.png"><img class="wp-image-4251 aligncenter" src="https://www.edutech.me.uk/wp-content/uploads/2015/09/Add_VSO_Collection-1024x394.png" alt="Add_VSO_Collection" width="715" height="275" />
</a>

Once you have added the user to the VSO Group. They will be able to access the VSO Collection by either going directly to your *.visualstudio.com address.

I hope that this helps, it is just one of the examples Azure B2B is going to help organizations stay secure, compliant and improve the end-user experience!

If you have any questions let me know,

James.]]></content:encoded>
    </item>
    <item>
      <title>Microsoft Health and Microsoft Band comes to the U.K.</title>
      <link>https://docs.microsoft.com/archive/blogs/edutech/microsoft-health-and-microsoft-band-comes-to-the-u-k</link>
      <pubDate>Tue, 17 Mar 2015 13:36:39 GMT</pubDate>
      <dc:creator><![CDATA[James Evans - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://www.edutech.me.uk/?p=3922</guid>
      <description><![CDATA[I am sure many of you out there have been waiting for the Microsoft Band to come to the UK! Today,...]]></description>
      <content:encoded><![CDATA[<img class="alignleft" src="https://cdn3.pcadvisor.co.uk/cmsdata/features/3515471/Microsoft-Band-Health.jpg" alt="" width="358" height="203" />I am sure many of you out there have been waiting for the Microsoft Band to come to the UK! Today, we announced that this is now happening and will be available from <strong>April 15th </strong>through Amazon, Currys PC World, Dixons Travel, Harrods, Microsoft Store and O2.

&nbsp;
<ul>
	<li><strong>Microsoft Health</strong> is an <strong>open</strong> <strong>cloud-based service</strong> that helps you live a healthier lifestyle by providing <strong>actionable insights</strong> based on data gathered from the fitness devices and apps that you use every day. It is designed to work with you, no matter what phone or service you use.  We’ve got some great partnerships including Runkeeper, MyFitnessPal, MapMyFitness, Microsoft Health Vault and in the U.K., we have an exciting partnership with Nuffield Health who are leaders in fitness and wellbeing.  <a href="https://www.microsoft.com/microsoft-health/en-gb">Find out more</a></li>
	<li><strong>Microsoft Band</strong> is the first device powered by Microsoft Health. <strong>Live healthier</strong> by tracking your heart rate, calorie burn and sleep quality alongside comprehensive fitness features such as on-board GPS for run and cycle tracking.  It also includes Guided Workouts, which is like having a personal trainer on your wrist.   In addition, the Microsoft Band <strong>helps you be more productive</strong> with calendar alerts, email previews and access to Cortana with Windows Phone<strong><sup>3</sup></strong>.   And to make it easy to get up and running, the Microsoft Band <strong>works with the phone you already own; Windows, iOS and Android</strong>.  <span style="text-decoration: underline">Find out more here.</span></li>
</ul>
<ol>
	<li><strong>Evangelize the top pillars for Microsoft Health </strong><strong>and</strong><strong> Microsoft Band:  </strong></li>
</ol>
<ul>
<ul>
<ul>
	<li>Follow @MicrosoftBand on Twitter and Like <a href="https://www.Facebook.com/MicrosoftBand">www.Facebook.com/MicrosoftBand</a></li>
	<li>Go and tell your friends and more information can be found at <a href="https://www.microsoft.com/microsoft-band/en-gb">Microsoft Band</a></li>
</ul>
</ul>
</ul>
<ol start="2">
	<li><strong>Developers should check out the </strong><a href="https://www.microsoft.com/microsoft-band/en-gb/developer?ocid=Band_CRM_MSDNFlashSDK"><strong>SDK Preview</strong></a></li>
</ol>
[embed]https://www.youtube.com/watch?v=swmSWcxHDqU[/embed]]]></content:encoded>
    </item>
    <item>
      <title>Azure Enterprise Agreement Guidance - using your existing work accounts (AAD) as oppose to Microsoft Accounts (MSA)...</title>
      <link>https://docs.microsoft.com/archive/blogs/edutech/azure-enterprise-agreement-guidance-using-your-existing-work-accounts-aad-as-oppose-to-microsoft-accounts-msa</link>
      <pubDate>Mon, 16 Mar 2015 00:28:05 GMT</pubDate>
      <dc:creator><![CDATA[James Evans - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://www.edutech.me.uk/?p=3852</guid>
      <description><![CDATA[As Microsoft Azure grows I am sure there are many of you out there whom may have already or are in...]]></description>
      <content:encoded><![CDATA[As Microsoft Azure grows I am sure there are many of you out there whom may have already or are in the process of signing a new Microsoft Enterprise Agreement! I am sure most of you out there have gone through the normal motions have just gone ahead and used Microsoft Accounts (Live ID) as oppose to maybe using your existing Work Accounts (Azure AD). If you are new to signing an agreement I recommend that you consider setting things up using work accounts from the start, as oppose to using Microsoft Accounts or/ if you have already set everything up then maybe look at re-aligning your account and subscription set-up before you head in too deep!

I hope the below guidance will be of some use, and if you have any questions please be sure to reach out to me.

when you receive the e-mail to sign your new agreement (today) you will be asked to sign the agreement using a <strong>Microsoft Account</strong> and then once this has been done, this account will be the first Enterprise Admin on your Enterprise Agreement.

<a href="https://www.edutech.me.uk/wp-content/uploads/2015/03/ea_sign.png"><img class="aligncenter wp-image-3862 size-large" src="https://www.edutech.me.uk/wp-content/uploads/2015/03/ea_sign-1024x269.png" alt="ea_sign" width="1024" height="269" /></a>

Once you have signed your agreement and login to https://ea.azure.com for the first time using that account, this is where you should ensure that you think about how you proceed before just going in and creating new <strong>account administrators</strong> and <strong>subscriptions</strong>.

If you are already using one of Microsoft's 1st party services such as Office 365, Dynamics CRM etc. then you will already no doubt have work accounts (AAD) and so it is recommended that you look at using these for your Enterprise Agreement. The first thing you should do is add your work account as an Enterprise Administrator (if your MSA uses the same domain namespace as your work account it will auto merge the 2 accounts together and use the work account (AAD)). If you are not overlapping the namespaces then you will need first ensure that your <strong>Enrollment Authentication Level</strong> is set to <b>Mixed Account. </b>

<a href="https://www.edutech.me.uk/wp-content/uploads/2015/03/mixed_account.png"><img class="aligncenter wp-image-3872 size-large" src="https://www.edutech.me.uk/wp-content/uploads/2015/03/mixed_account-1024x219.png" alt="mixed_account" width="1024" height="219" /></a>

Once this has been done, select <strong>add administrator</strong> and then add your <b>work account</b> as an administrator, you will receive an e-mail once you click on the URL contained within it will then confirm your account and you will be added as an enterprise administrator.

Moving forward, ensure that when you add new <strong>Enterprise Administrators or/ Account Administrators </strong> you add your employees 'work accounts'. The purpose behind doing this is to give your employees a consistent experience across all the administration portals but the most <strong>important</strong> reason is because when you create an account administrator, this person can create subscriptions... when new subscriptions are created by using the work account this will <strong>ensure</strong> that the subscriptions automatically get linked to the <strong>existing azure active directory</strong> and doesn't create a new directory.

I see the following as the fundamental best practices, obvious every enterprise company is different but hopefully understanding these concepts will help..
<ol>
	<li>An <strong>Account Administrator</strong> will become the <strong>Account Administrator</strong> of each subscription they create and be the initial <strong>Service Administrator</strong>.</li>
	<li>It is good practice to ensure that your <strong>Account Administrators</strong> are 'Service Accounts' as oppose to Individuals so I would recommend you creating 3 service accounts</li>
</ol>
<table>
<tbody>
<tr>
<td width="208"><strong>UserPrincipalName</strong></td>
<td width="208"><strong>Role</strong></td>
<td width="349"><strong>Purpose</strong></td>
</tr>
<tr>
<td width="208"><b>aa_azure@contoso.com</b></td>
<td width="208">Account Administrator</td>
<td width="349">Individual Account Administrator for each subscription</td>
</tr>
<tr>
<td width="208"><b>sa_azure@contoso.com</b></td>
<td width="208">Service Administrator</td>
<td width="349">Individual Service Administrator for Each Subscription</td>
</tr>
<tr>
<td width="208"><b>ea_azure@contoso.com</b></td>
<td width="208">Enterprise Administrator</td>
<td width="349">EA Top Level Administrator</td>
</tr>
</tbody>
</table>
You can change the Service Administrator of the Subscription when it has been created to be the sa_azure@contoso.com account. to ensure that finance teams whom may have access to the account administrator role do not have administrator privileges over your resources hosted within the subscriptions.

If I was to draw this in to rough picture, it would look something like the following:

&nbsp;

<a href="https://www.edutech.me.uk/wp-content/uploads/2015/03/EnterpriseAgreement_Overview_AAD.png"><img class="aligncenter size-large wp-image-3892" src="https://www.edutech.me.uk/wp-content/uploads/2015/03/EnterpriseAgreement_Overview_AAD-1024x656.png" alt="EnterpriseAgreement_Overview_AAD" width="1024" height="656" /></a>

This in essence shows that your synchronize your on-premise identities to Azure Active Directory and you use this directory service for Office 365 and you also use the same directory service for your Azure Enterprise Agreement which in turn also means that for each of the subscriptions you create under the EA you will also sign-in to these using your work account. This ensures that you have a consistent, secure and manageable identity across all of your Microsoft Services.

If you are not currently a customer of any of the 1st party services, you can still create a azure active directory to ensure that you start off on the right path you can sign-up to Azure AD using https://account.windowsazure.com/organization and then you can manage that directory service using https://portal.office.com and then once you can use the directory and the accounts with-in it to structure your EA as per above. later, if you plan to use Office 365 or any of other Microsoft Online Services you can use the directory service you have already setup. you just add the subscription via purchase services in the portal.office.com.

I hope that this helps, of course every enterprise is different and so this is to give you a example. the only rule i would take away is to ensure no matter how you setup the EA ensure that you use work accounts NOT Microsoft Accounts. Microsoft Accounts aka Live IDs are <strong>consumer identities</strong> and you should avoid using these if possible in the Enterprise unless the service your attempting to use does not support work accounts.

Thanks,

James.]]></content:encoded>
    </item>
    <item>
      <title>Changes to Azure AD Authentication Flows - Simplicity &amp; Consistency</title>
      <link>https://docs.microsoft.com/archive/blogs/edutech/changes-to-azure-ad-authentication-flows-simplicity</link>
      <pubDate>Sat, 07 Mar 2015 02:56:12 GMT</pubDate>
      <dc:creator><![CDATA[James Evans - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://www.edutech.me.uk/?p=3721</guid>
      <description><![CDATA[I thought I would post this up here for the regular readers, a colleague of mine whom is a Program...]]></description>
      <content:encoded><![CDATA[I thought I would post this up here for the regular readers, a colleague of mine whom is a Program Manager over in the Cloud Authentication Services Team recently wrote an article, rather than duplicating effort! have a read below this is especially important to you developers out there whom maybe wondering about some of the changes...

so,

If you've ever taken a trace of the authentication requests from your Azure AD protected app you've probably noticed that requests to <a href="https://login.windows.net/">https://login.windows.net</a> are federated to <a href="https://login.microsoftonline.com/">https://login.microsoftonline.com</a>. The user's credentials are evaluated at <a href="https://login.microsoftonline.com/">https://login.microsoftonline.com</a> and upon successful authentication the user is directed back to <a href="https://login.windows.net/">https://login.windows.net</a> which finally issues your app the token it requested. A typical sign-in flow might look like this:
<p style="text-align: center"><img class=" aligncenter" src="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-51-31-metablogapi/030615_5F00_1710_5F00_Simplifying1.png" alt=" " /></p>
We've now made a simplification in our service to remove all those redirects. All authentication requests can now be served directly by <a href="https://login.microsoftonline.com/">https://login.microsoftonline.com</a> end-to-end. To see it in action, open an InPrivate tab and try this link (which will send you to a non-existent "directory searcher" app after sign in):

<a href="https://login.microsoftonline.com/common/oauth2/authorize?client_id=a5d92493-ae5a-4a9f-bcbf-9f1d354067d3&amp;response_mode=form_post&amp;response_type=code">https://login.microsoftonline.com/common/oauth2/authorize?client_id=a5d92493-ae5a-4a9f-bcbf-9f1d354067d3&amp;response_mode=form_post&amp;response_type=code</a>

Or, try signing into the Azure Management Portal: <a href="https://manage.windowsazure.com/">https://manage.windowsazure.com</a>.

This change presents several advantages:
<ul>
	<li>Your users get a faster sign-in experience free of extra hops.</li>
	<li>The sign-in user experience includes several new features. Examples are the ability to maintain multiple actively signed-in users and a more responsive UI that behaves appropriately across more devices and screens.</li>
	<li>We can enable a number of features in our engineering systems that will lead to an even more reliable service.</li>
</ul>
The natural question that follows - what impact does this have on your existing app? <strong> Largely, the answer is none.</strong> However, if your app makes certain assumptions about our underlying implementation it may require changes. Here are some subtle differences that you should be aware of:
<ul>
	<li>Applications that send requests to <a href="https://login.windows.net/">https://login.windows.net</a> will continue to be supported. The redirect to <a href="https://login.microsoftonline.com/">https://login.microsoftonline.com</a> will occur earlier in the authentication flow than before, and will maintain protocol consistency. For example, OAuth2 authorization requests will now redirect to <a href="https://login.microsoftonline.com/common/oauth2/authorize">https://login.microsoftonline.com/common/oauth2/authorize</a> rather than <a href="https://login.microsoftonline.com/login.srf">https://login.microsoftonline.com/login.srf</a>.</li>
	<li>Any tokens issued, errors displayed or errors reported will now come from <a href="https://login.microsoftonline.com/">https://login.microsoftonline.com</a>.</li>
	<li>The HTML markup and scripts for the new sign-in experience are significantly different even though the visual appearance may be the same. Any tests that rely on exact markup may break and need to be updated.</li>
	<li>The discovery endpoint <a href="https://login.windows.net/contoso.com/.well-known/openid-configuration">https://login.windows.net/contoso.com/.well-known/openid-configuration</a> will continue to return legacy <a href="https://login.windows.net/">https://login.windows.net</a> based endpoints. Those endpoints will then follow the appropriate redirects. The new discovery endpoint <a href="https://login.microsoftonline.com/contoso.com/.well-known/openid-configuration">https://login.microsoftonline.com/contoso.com/.well-known/openid-configuration</a> will return equivalent <a href="https://login.microsoftonline.com/">https://login.microsoftonline.com</a> endpoints.</li>
</ul>
And in the interest of being thorough, the following items have <em>not </em>changed:
<ul>
	<li>The behavior of both token endpoints will remain precisely the same.</li>
	<li>The value of the "issuer" both in metadata and in tokens issued by Azure AD will remain the same – it will continue to be <a href="https://sts.windows.net/">https://sts.windows.net/</a> based.</li>
</ul>
If you're creating a new application, you should use <a href="https://login.microsoftonline.com/">https://login.microsoftonline.com</a> as the authority going forward. Our documentation and samples will be updated shortly to reflect the change. If for any reason you need to ship an app using <a href="https://login.windows.net/">https://login.windows.net</a> going forward, please contact us before doing so – tweet us at <a href="https://twitter.com/azuread">@azuread</a>.

For those applications currently authenticating against <a href="https://login.windows.net/">https://login.windows.net</a>, we recommend making the effort to incorporate the change immediately; your users will get an improved sign in experience, and your authentication flows will be free of extra complexity.

Thanks Danny!

<strong>Source: </strong>https://blogs.technet.com/b/ad/archive/2015/03/06/simplifying-our-azure-ad-authentication-flows.aspx

If you have any questions feel free to reach out to us over at the @azuread twitter alias! or if I can do anything to help let me know!

Enjoy!

James.]]></content:encoded>
    </item>
    <item>
      <title>unable to verify domain name - Office 365 / Azure AD</title>
      <link>https://docs.microsoft.com/archive/blogs/edutech/unable-to-verify-domain-name-office-365-azure-ad</link>
      <pubDate>Sat, 07 Mar 2015 02:48:01 GMT</pubDate>
      <dc:creator><![CDATA[James Evans - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://www.edutech.me.uk/?p=3681</guid>
      <description><![CDATA[I just wanted to a quick article about issues that I see come up quite often where you are unable to...]]></description>
      <content:encoded><![CDATA[I just wanted to a quick article about issues that I see come up quite often where you are unable to verify a domain against a Microsoft Online Service or more specifically Azure Active Directory, Today this can be down to quite a few different issues which are generally in the following buckets {be sure to read the full article before proceeding}
<blockquote>The domain has already been verified against Azure AD by another IT Admin within your organization, he may have left the business and you no longer have access to the tenant.</blockquote>
<a href="https://www.edutech.me.uk/wp-content/uploads/2015/03/domain_failure_RMSADHOC.png"><img class="aligncenter size-medium wp-image-3691" src="https://www.edutech.me.uk/wp-content/uploads/2015/03/domain_failure_RMSADHOC-300x142.png" alt="domain_failure_RMSADHOC" width="300" height="142" /></a>

In this particular scenario you will have to contact Microsoft Support for assistance and go through a domain dispute process which support engineering teams can assist you with and unblock you from verifying your domain.

but, in many cases this could just be down to one of the following reasons and the good news is you can get things moving forward all by yourself so I hope that this will help!

If you portal UI allows you to add the domain, provides you with a record to enter in to Public DNS but then fails to verify then it's always best for you to attempt to verification using powershell as a backup before phoning Microsoft Support for assistance. In order to do this you just need to download the Microsoft Online Sign-In Assistant and Microsoft Online PowerShell Module which can be found here: <a href="https://aka.ms/aadposh">https://aka.ms/aadposh</a>

Once you have downloaded the require components and successfully installed them go ahead and launch a powershell console
<pre>Connect-MsolService</pre>
<em>enter your global admin credentials {example: admin@contoso.onmicrosoft.com}</em>
<pre>Confirm-MsolDomain -DomainName contoso.com</pre>
If this then fails, take a sneak peak at the PowerShell MSONLINE Log Files and if you still need further guidance, ensure to attach that to the support incident as it is super helpful to the support engineering teams when investigating the problem your having. These files can be found "C:Users<span style="color: #ff0000">%username%</span>AppDataLocalMicrosoftOffice365Powershell"
<h3>Power Bi Individual Signup</h3>
If you get the following notification:

<a href="https://www.edutech.me.uk/wp-content/uploads/2015/03/powerbi_signup.png"><img class="aligncenter size-medium wp-image-3801" src="https://www.edutech.me.uk/wp-content/uploads/2015/03/powerbi_signup-300x115.png" alt="powerbi_signup" width="300" height="115" /></a>

then someone in your company has signed up for Power BI and you will first need to become and admin of that tenant that was automatically created for you. or/ if your an education establishment that a student or teacher has acquired there Office for Education eligibility and so, as the IT Admin head over to <span style="color: #ff0000">[PowerBi]</span> <a href="https://www.powerbi.com/dashboards"><strong>https://www.powerbi.com/dashboards</strong></a> or <span style="color: #ff0000">[Office]</span> <strong><a href="https://portal.office.com/start?sku=e82ae690-a2d5-4d76-8d30-7c6e01e6022e">https://portal.office.com/start?sku=e82ae690-a2d5-4d76-8d30-7c6e01e6022e</a> </strong>and enter your e-mail ID. Once you have received the e-mail click on the confirmation link and complete the fields, an account for you will be created and then you can login.

Once you have done this, you will have an option to <b>Become an Admin</b> by clicking this link it will provide you with a record type (TXT or MX) and a value for you to add to Public DNS. Once you have done this, head back in to the portal and verify the domain.

Once you have verified the domain this will make your account a <strong>Global Admin</strong> of that tenant, you will then be able to see the users (yourself + everyone whom signed up for PowerBI) and you will be able to then make a decision as to weather you continue using this tenant that was created for you or/ removing the domain. unfortunately if you remove the domain the individuals that signed up for PowerBi will no longer have access to there data and so be sure to check with them first before proceeding.

Office for Education have an FAQ which is worth reading which explains the process and that can be found here: <span lang="EN-US" style="color: #1f497d;font-family: 'Calibri',sans-serif;font-size: 11pt"><a href="https://support.office.com/en-US/Article/Office-365-Education-for-Students-FAQ-7fb1b2f9-94c2-4cbb-b01e-a6eca34261d6?ui=en-US&amp;rs=en-US&amp;ad=US"><span style="color: #0563c1">https://support.office.com/en-US/Article/Office-365-Education-for-Students-FAQ-7fb1b2f9-94c2-4cbb-b01e-a6eca34261d6?ui=en-US&amp;rs=en-US&amp;ad=US</span></a></span>

If you have any difficulties or are not sure on how to proceed, reach out to Microsoft Support and they will be able to assist you with this process and get you moving forward without delay! if you have any issues please feel free to reach out to me.

Another topic that comes up quite often is where IT Administrators who have signed up for Microsoft Azure attempt to verify the domain against there Azure AD. If this fails, again it is likely you fall in to one of the above scenarios! but it might also mean that you genuinely are already using a Microsoft Online Service such as Office 365, Dynamics CRM or Intune which is great! but you should have signed up to Microsoft Azure using your existing work account aka organizational account and then it would have used the same Azure AD you have for the 1st party services as mentioned. If you didn't do this don't worry there is a way you can resolve this on the assumption that you signed up to Microsoft Azure using a Microsoft Account aka Live ID.
<ol>
	<li>open a support incident with Microsoft and ask them to perform an Account Admin Ownership Transfer which updates you billing account admin &amp; service admin and also changes the default directory associated to the subscription to be your existing directory.</li>
	<li>Follow the article that have written last year, although I personally would recommend you remove the MSA from the equation altogether and do it properly! :-) <a href="https://www.edutech.me.uk/microsoft/identity-and-access-management/active-directory/link-microsoft-office-365-organization-account-to-windows-azure-subscription/">https://www.edutech.me.uk/microsoft/identity-and-access-management/active-directory/link-microsoft-office-365-organization-account-to-windows-azure-subscription/</a></li>
</ol>
My recommendation to you if your an enterprise is to <strong>always use</strong> work accounts aka organizational accounts try and avoid using <strong>Microsoft Accounts </strong>in the business and enterprise! remember a Microsoft Account is a consumer identity so you as a business do not have any control or management over the account [best practice].

I hope that helps, reach out to me if you have any issues!

Enjoy &amp; Thank You!

James.]]></content:encoded>
    </item>
    <item>
      <title>Script: - Bulk Assign Users to SaaS Application using Graph API &amp; ADAL</title>
      <link>https://docs.microsoft.com/archive/blogs/edutech/script-bulk-assign-users-to-saas-application-using-graph-api-adal</link>
      <pubDate>Wed, 04 Mar 2015 01:59:33 GMT</pubDate>
      <dc:creator><![CDATA[James Evans - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://www.edutech.me.uk/?p=3621</guid>
      <description><![CDATA[Assigning users permissions to access to azure active directory SaaS Applications can be quite a...]]></description>
      <content:encoded><![CDATA[Assigning users permissions to access to azure active directory SaaS Applications can be quite a mundane task especially if you haven't purchased Azure Active Directory Premium which would enable you to assign permissions to a group which i would honestly recommend as a long term sustainable solution for this but if you have a requirement to bulk assign users to an application then the following might come in handy!
<h3><strong>How to use the module</strong></h3>
To Execute the following command you need to replace the information within the 'body' with the information of the application you wish to assign to users.

First, you need to get a list of your applications within the directory which you can do by using <a href="https://graphexplorer.cloudapp.net/">graph explorer</a> and the following resource endpoint. *remember to replace 'tenant.onmicrosoft.com' with the name of your tenant.
<blockquote><strong>https://graph.windows.net/tenant.onmicrosoft.com/servicePrincipals?api-version=1.5</strong></blockquote>
Find the application within the output in this scenario we are using 'twitter' and you need to take the following attribute as you will need the value for the body as this will be your <span style="text-decoration: underline">ResourceID</span>:
<blockquote><strong>"objectId": "<span style="color: #ff0000">2f37a4ce-893f-4392-b4ae-e0df9fbfe365</span>",</strong></blockquote>
and the following value as this will be your <span style="text-decoration: underline">ID</span>
<blockquote>"appRoles": [
{
"allowedMemberTypes": [
"User"
],
"description": "msiam_access",
"displayName": "msiam_access",
<strong>"id": "<span style="color: #ff0000">d84db298-28e2-4b2c-ab52-e70012cbabbf</span>",</strong>
"isEnabled": true,
"value": null
}
],</blockquote>
The PrincipalID value is the User Object but in this script as we will be doing this in bulk we shall parse that value in to each request body during the ForEach Loop we do using the final command.

<a href="https://www.edutech.me.uk/mydownloads/GraphAddUserToApplication.zip">Download the PSM1</a> and place it in your chosen directory, we shall be using c:scripts as our working directory in this walkthrough which is a module that can be imported into your powershell session using the following command
<pre>Import-Module c:scriptsGraphAddUserToApplication.psm1</pre>
Once the script module has been imported, you then need to run the following function which will load in ADAL
<pre>Load-ActiveDirectoryAuthenticationLibrary</pre>
Once this has been done, you then need to set the below <strong>global</strong> variable, this will launch a window in which you will authenticate as an user whom is a global administrator in the directory in which your users and application is located.
<pre>$global:authenticationResult = Get-AuthenticationResult</pre>
Once that has been done, you can then proceed with the following command. The CSV file will have a single header called <strong>UserPrincipalName</strong> and then a list of UserPrincipalNames (i recommend you do this against a few users in the directory initially to ensure it works as expected).
<pre>$csv = Import-CSV C:ScriptsAADUser.csv | % {$user = get-aaduser -Id $_.UserPrincipalName;Set-AppRoleAssignments -userId $user.Objectid}</pre>
Once completed, you should find that your users have now been assigned the application you wanted to assign.
<h3><strong>The Module (functions) Explained!.... </strong></h3>
The first function <strong>Load-AzureActiveDirectoryAuthenticationLibrary</strong>  first checks the presence of ADAL.Net libraries in the Nugets folder in user’s My Documents folder. If it doesn’t find the library it downloads nuget.exe from https://www.nuget.org and installs the Microsoft.IdentityModel.Clients.ActiveDirectory nuget. It then Loads the two assemblies that make up the ADAL.net SDK i.e. Microsoft.IdentityModel.Clients.ActiveDirectory.dll and Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
<pre>function Load-ActiveDirectoryAuthenticationLibrary(){
  $moduleDirPath = [Environment]::GetFolderPath("MyDocuments") + "WindowsPowerShellModules"
  $modulePath = $moduleDirPath + "AADGraph"
  if(-not (Test-Path ($modulePath+"Nugets"))) {New-Item -Path ($modulePath+"Nugets") -ItemType "Directory" | out-null}
  $adalPackageDirectories = (Get-ChildItem -Path ($modulePath+"Nugets") -Filter "Microsoft.IdentityModel.Clients.ActiveDirectory*" -Directory)
  if($adalPackageDirectories.Length -eq 0){
    Write-Host "Active Directory Authentication Library Nuget doesn't exist. Downloading now ..." -ForegroundColor Yellow
    if(-not(Test-Path ($modulePath + "Nugetsnuget.exe")))
    {
      Write-Host "nuget.exe not found. Downloading from https://www.nuget.org/nuget.exe ..." -ForegroundColor Yellow
      $wc = New-Object System.Net.WebClient
      $wc.DownloadFile("https://www.nuget.org/nuget.exe",$modulePath + "Nugetsnuget.exe");
    }
    $nugetDownloadExpression = $modulePath + "Nugetsnuget.exe install Microsoft.IdentityModel.Clients.ActiveDirectory -Version 2.14.201151115 -OutputDirectory " + $modulePath + "Nugets | out-null"
    Invoke-Expression $nugetDownloadExpression
  }
  $adalPackageDirectories = (Get-ChildItem -Path ($modulePath+"Nugets") -Filter "Microsoft.IdentityModel.Clients.ActiveDirectory*" -Directory)
  $ADAL_Assembly = (Get-ChildItem "Microsoft.IdentityModel.Clients.ActiveDirectory.dll" -Path $adalPackageDirectories[$adalPackageDirectories.length-1].FullName -Recurse)
  $ADAL_WindowsForms_Assembly = (Get-ChildItem "Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll" -Path $adalPackageDirectories[$adalPackageDirectories.length-1].FullName -Recurse)
  if($ADAL_Assembly.Length -gt 0 -and $ADAL_WindowsForms_Assembly.Length -gt 0){
    Write-Host "Loading ADAL Assemblies ..." -ForegroundColor Green
    [System.Reflection.Assembly]::LoadFrom($ADAL_Assembly[0].FullName) | out-null
    [System.Reflection.Assembly]::LoadFrom($ADAL_WindowsForms_Assembly.FullName) | out-null
    return $true
  }
  else{
    Write-Host "Fixing Active Directory Authentication Library package directories ..." -ForegroundColor Yellow
    $adalPackageDirectories | Remove-Item -Recurse -Force | Out-Null
    Write-Host "Not able to load ADAL assembly. Delete the Nugets folder under" $modulePath ", restart PowerShell session and try again ..."
    return $false
  }
}
</pre>
The Get-AuthenticationResult function calls the AquireToken method provided by ADAL.net SDK to authenticate the user and returns the authentication results that contains the access token to access the Graph API.
<pre>function Get-AuthenticationResult($tenant = "common", $env="prod"){
  $clientId = "1950a258-227b-4e31-a9cf-717495945fc2"
  $redirectUri = "urn:ietf:wg:oauth:2.0:oob"
  $resourceClientId = "00000002-0000-0000-c000-000000000000"
  $resourceAppIdURI = "https://graph.windows.net/"
  $authority = "https://login.windows.net/" + $tenant
  if($env.ToLower() -eq "china"){$resourceAppIdURI = "https://graph.chinacloudapi.cn/"; $authority = "https://login.chinacloudapi.cn/" + $tenant}
  $authContext = New-Object "Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext" -ArgumentList $authority,$false
  $authResult = $authContext.AcquireToken($resourceAppIdURI, $clientId, $redirectUri, [Microsoft.IdentityModel.Clients.ActiveDirectory.PromptBehavior]::Always)
  return $authResult
}
</pre>
The Get-AADObject function receives as input the entity type e.g. “users” or “applications”. It then constructs the entity URI and employs the Invoke-RESTMethod base PowerShell cmdlet to invoke an HTTP GET on Graph API. The function retrieves the access token from the global authentication result variable and adds an Authorization header to the REST method call. Invoke-RestMethod cmdlets does the heavy lifting of creating an HTTPClient invoking the API and converting the returned JSON into objects that the Get-AADObject emits on the PowerShell pipeline
<pre>function Get-AADObject([string]$type) {
  $objects = $null
  if($authenticationResult -ne $null){
    $header = $authenticationResult.CreateAuthorizationHeader()
    $uri = [string]::Format("https://graph.windows.net/{0}/{1}?api-version=2013-04-05",$authenticationResult.TenantId, $type)
    Write-Host HTTP GET $uri -ForegroundColor Cyan
    $result = Invoke-RestMethod -Method Get -Uri $uri -Headers @{"Authorization"=$header;"Content-Type"="application/json"}
    if ($result -ne $null) {
      $objects = $result.Value
    }
  }
  else{
    Write-Host "Not connected to an AAD tenant. First run Connect-AAD." -ForegroundColor Yellow
  }
  return $objects
}
</pre>
The Get-AADObjectById is similar to Get-AADObject except that it invokes HTTP GET on a specific Graph API object.
<pre>function Get-AADObjectById([string]$type, [string]$id) {
  $object = $null
  if($global:authenticationResult -ne $null){
    $header = $authenticationResult.CreateAuthorizationHeader()
    $uri = [string]::Format("https://graph.windows.net/{0}/{1}/{2}?api-version=2013-04-05",$authenticationResult.TenantId, $type.Trim(), $id.Trim())
    Write-Host HTTP GET $uri -ForegroundColor Cyan
    $object = Invoke-RestMethod -Method Get -Uri $uri -Headers @{"Authorization"=$header;"Content-Type"="application/json"}
  }
  else{
    Write-Host "Not connected to an AAD tenant. First run Connect-AAD." -ForegroundColor Yellow
  }
  return $object
}
</pre>
The Get-AADObject and Get-AADObjectById generic functions do the work of calling the RESTful Graph APIs. Get-AADUser (and other Get-AAD* cmdlets in this module) are simple cmldets that leverage these generic functions. The function definition is more formal, with the parameter attribute defining whether the Id parameter is mandatory, as well as providing a HelpMessage for the parameter.
<pre>function Get-AADUser {
  [CmdletBinding()]
  param (
    [parameter(Mandatory=$false,
    ValueFromPipeline=$true,
    HelpMessage="Either the ObjectId or the UserPrincipalName of the User.")]
    [string]
    $Id
  )
  PROCESS {
    if($Id -ne "") {
      Get-AADObjectById -Type "users" -Id $id
    }
    else {
      Get-AADObject -Type "users"
    }
  }
}
</pre>
The Set-AppRoleAssignments function uses similar code from the previous functions Get-AADObject and Get-AADObjectByID but in this function we also include a body and change the graph endpoint slightly so that it send the body to the graph endpoint appRoleAssignments. This will then be used to add the user (PrincipalID) to the service principal defined by the ID and ResourceID.
<pre>function Set-AppRoleAssignments($userID) {
  $objects = $null
  if($authenticationResult -ne $null){
    $header = $authenticationResult.CreateAuthorizationHeader()
    $uri = [string]::Format("https://graph.windows.net/{0}/users/{1}/appRoleAssignments?api-version=1.5",$authenticationResult.TenantId, $userID)

#ResourceId is the objectId of the application servicePrincipal that get created in the tenant in the previous command.#
#ID is the default role id of SaaS Application. The value is d84db298-28e2-4b2c-ab52-e70012cbabbf in all tenants.########
#PrincipalId is the objectId of the principal (user or group) that is being assigned to the app.###################
#You need to replace the ID and Resource ID in the 'Body'##########################################################

$body = @"
{
    "id":  "d84db298-28e2-4b2c-ab52-e70012cbabbf",
    "principalId":  "$userID",
    "resourceId":  "2f37a4ce-893f-4392-b4ae-e0df9fbfe365"
}
"@

    Write-Host HTTP GET $uri -ForegroundColor Cyan
    $result = Invoke-RestMethod -Method Post -Uri $uri -Headers @{"Authorization"=$header;"Content-Type"="application/json"} -Body $Body
    if ($result -ne $null) {
      $objects = $result.Value
    }
  }
  else{
    Write-Host "Not connected to an AAD tenant. First run Connect-AAD." -ForegroundColor Yellow
  }
  return $objects
}
</pre>
This was built upon work that had already been done by Dushyant whom is a colleague that works in the Microsoft Engineering Team, further information around AADGraphPowerShell can be found over on his <a href="https://www.dushyantgill.com/blog/2013/12/27/aadgraphpowershell-a-powershell-client-for-windows-azure-ad-graph-api/">blog</a>! check it out.

I hope that this comes in handy! but remember, this is ideally to help if you need to assign a bulk user set to an application quickly it isn't designed to run as an automated process to manage user assignment this <strong>should</strong> be done using Group Application Assignment which is a feature of which is part of Azure Active Directory Premium!

Enjoy, and remember Test! before using in production environment!

James.]]></content:encoded>
    </item>
    <item>
      <title>Script: - PowerShell Script to Connect to all Microsoft Online Services using one function!</title>
      <link>https://docs.microsoft.com/archive/blogs/edutech/script-powershell-script-to-connect-to-all-microsoft-online-services-using-one-function</link>
      <pubDate>Wed, 04 Mar 2015 01:55:10 GMT</pubDate>
      <dc:creator><![CDATA[James Evans - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://www.edutech.me.uk/?p=3471</guid>
      <description><![CDATA[Feedback that we hear every now and again,Is how much it can be a pain for IT Admins whom need to...]]></description>
      <content:encoded><![CDATA[Feedback that we hear every now and again,Is how much it can be a pain for IT Admins whom need to administer multiple Microsoft Online Services via PowerShell. Each service require you to use a different module or dynamic script endpoint in order for you to be able to administer that service, and for some administrators this can be a real inconvenience. This particular script (which you should ideally add to your $profile will allow you to connect to all services using 1 command and you don't even have to connect to all services each time!).

<a href="https://www.edutech.me.uk/downloads/profile.zip">Download PS1 File {zipped}</a>

The most efficient way to manage this is to paste the following code in to a notepad, and then save it as profile.ps1 in your windows powershell directory "C:Users%username%DocumentsWindowsPowerShell" this will ensure that each time you open a powershell console, the following code is loaded and you will be able to use the functions that have been made available.

Functions that can be called are as follows:
<p style="padding-left: 30px"><strong>Connect-Service [-All Services -AzureAD -Exchange -Lync -SharePoint]</strong></p>

<pre>Function Connect-Service{
param(
[Parameter(ParameterSetName='IndividualService')][switch]$AzureAD,
[Parameter(ParameterSetName='IndividualService')][switch]$Exchange,
[Parameter(ParameterSetName='IndividualService')][switch]$Lync,
[Parameter(ParameterSetName='IndividualService')][switch]$SharePoint,
[Parameter(ParameterSetName='AllServices')][switch]$AllServices
)

switch ($psCmdlet.ParameterSetName){
'IndividualService' {
if (!($AzureAD -or $Exchange -or $Lync -or $SharePoint)){
throw("You must choose at least one service to connect to. Run Get-Help Connect-Service to see available parameters")
}
}

'AllServices'{}

default {throw("You must choose at least one service to connect to. Run Get-Help Connect-Service to see available parameters")}
}

#Gather credentials
#==================
Write-Host "Gathering installed modules. Please wait...." -ForegroundColor Cyan
$Modules = Get-Module -ListAvailable -Refresh
Write-Host ""
Write-Host "Please Enter your Azure Active Directory credentials into the popup window" -ForegroundColor Yellow
$UserCredentials = Get-Credential -Message "Please enter your Azure AD credentials"

#Validate username is of UPN format
#==================================
if ($UserCredentials.UserName -notmatch '.*@.*'){
throw("Username must be entered in UserPrincipalName format (i.e. admin@contoso.onmicrosoft.com). Please re-run this function and try again")
}

#Connect to SharePoint
#=====================
if ($SharePoint -or $AllServices){
if (($Modules | Select-Object -ExpandProperty Name) -contains 'Microsoft.Online.SharePoint.PowerShell'){
$SPOTenant = Read-Host -Prompt "Please enter the SharePoint admin url (i.e. https://contoso-admin.sharepoint.com)"
Write-Host "Logging into SharePoint Online" -ForegroundColor Cyan
Import-Module Microsoft.Online.SharePoint.PowerShell
Connect-SPOService -Url $SPOTenant -Credential $UserCredentials
} else {
Write-Warning "Could not connect to SharePoint. Microsoft.Online.SharePoint.PowerShell module is not installed"
}
}

#Connect to Azure AD
#===================
if ($AzureAD -or $AllServices){
if (($Modules | Select-Object -ExpandProperty Name) -contains 'MSOnline'){
Write-Host "Logging into Azure AD" -ForegroundColor Cyan
Import-Module MSOnline
Connect-MSOLService -Credential $UserCredentials
} else {
Write-Warning "Could not connect to Azure AD. MSOnline module is not installed"
}
}

#Connect to Exchange
#===================
if ($Exchange -or $AllServices){
Write-Host "Logging into Exchange Online" -ForegroundColor Cyan
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredentials -Authentication Basic -AllowRedirection
if ($Session -ne $null){
Import-PSSession $Session
} else {
Write-Warning "Unable to connect to Exchange Online. Please check credentials, and that you have admin privileges to Exchange service"
}
}

#Connect to Lync
#===============
if ($Lync -or $AllServices){
if (($Modules | Select-Object -ExpandProperty Name) -contains 'LyncOnlineConnector'){
Write-Host "Logging into Lync Online" -ForegroundColor Cyan
Import-Module LyncOnlineConnector
$Session = New-CsOnlineSession -Credential $UserCredentials
if ($Session -ne $null){
Import-PSSession $Session
} else {
Write-Warning "Unable to connect to Lync Online. Please check credentials, and that you have admin privileges to Exchange service"
}
} else {
Write-Warning "Could not connect to Lync. LyncOnlineConnector module is not installed"
}
}

}

</pre>
I hope that helps,

James / Ashley
@Microsoft Cloud Identity Escalations]]></content:encoded>
    </item>
    <item>
      <title>Azure AD Premium – Now Available via Direct Purchase</title>
      <link>https://docs.microsoft.com/archive/blogs/edutech/azure-ad-premium-now-available-via-direct-purchase</link>
      <pubDate>Thu, 08 Jan 2015 02:17:25 GMT</pubDate>
      <dc:creator><![CDATA[James Evans - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://www.edutech.me.uk/?p=3291</guid>
      <description><![CDATA[For those of you whom have been itching to get your hands on to Azure AD Premium Licenses but would...]]></description>
      <content:encoded><![CDATA[<p>For those of you whom have been itching to get your hands on to Azure AD Premium Licenses but would of preferred to have purchased them on a per-month basis like you do with your Office 365, Dynamics CRM or Intune Subscriptions, the good news is you now can. </p> <p>In the Office 365 Administration Portal if you click on <strong>Purchase Services</strong> you will now find Azure AD Premium is available to purchase and is payable on a per user, per month basis. </p> <p>&nbsp;</p> <p><a href="https://www.edutech.me.uk/wp-content/uploads/2015/01/image.png"><img title="image" style="border-top: 0px;border-right: 0px;border-bottom: 0px;border-left: 0px" border="0" alt="image" src="https://www.edutech.me.uk/wp-content/uploads/2015/01/image_thumb.png" width="644" height="142"></a> </p> <p>&nbsp;</p> <p>All of those amazing new features that are only available to users whom have an Azure AD Premium License can now have access to this instantly by purchasing a license as per above. </p> <p>I hope that this allows you to adopt and use the great features that are available as part of the Premium License!</p> <p>If you have any questions let me know, </p> <p>Thanks </p> <p>James.</p>]]></content:encoded>
    </item>
  </channel>
</rss>