Create Identity in Google Cloud Platform and GSuite

Compare to some other cloud providers, creating an identity via code in GCP is a little fragmented if your using GSuite for your identity storage. The Google Cloud Platform holds your users identity reference and permission, while the other system GSuite hold the security of the users authentication. This can also make the documentation feel a little fragmented and not so easy to follow. Hence this post to stick them together in how I used C# Dot Net Core to create a Google Cloud Platform Identity using their SDK.

This part is standard for any SDK access to GCP, which is to have a service account authentication. For this you will need to create a Service Account in GCP, which needs to be associated with a project. You can create it against the project where you are deploying, or to keep things separate, like I would recommend, you can create a  Service Management Project. This is just a standard project, but you can use this to keep all the SDK activity on this project while the usage activity happens on the other project.

Create a Project

  1. Go to the Manage resources page in the Cloud Console.
  2. On the Select organization drop-down list at the top of the page, select the organization in which you want to create a project. If you are a free trial user, skip this step, as this list does not appear.
  3. Click Create Project.
  4. In the New Project window that appears, enter a project name and select a billing account as applicable. A project name can contain only letters, numbers, single quotes, hyphens, spaces, or exclamation points, and must be between 4 and 30 characters.
  5. Enter the parent organization or folder in the Location box. That resource will be the hierarchical parent of the new project.
  6. When you’re finished entering new project details, click Create.


Create a Service Account

  1. In the Cloud Console, go to the Service accounts page.
  2. Select a project (your new Service Management Project).
  3. Click Create service account.
  4. Enter a service account name to display in the Cloud Console.
    The Cloud Console generates a service account ID based on this name. Edit the ID if necessary. You cannot change the ID later.
  5. Optional: Enter a description of the service account.
  6. If you do not want to set access controls now, click Done to finish creating the service account.
    To set access controls now, click Create and continue to the next step.
  7. Optional: Choose one or more IAM roles to grant to the service account on the project.
  8. When you are done adding roles, click Continue.
  9. Optional: In the Service account users role field, add members that can impersonate the service account.
  10. Optional: In the Service account admins role field, add members that can manage the service account.
  11. Click Done to finish creating the service account.


You could then get more specific for the Identity Access Management (IAM) permissions, but to keep it simple you would just need to apply the Service Account ‘Owner’ and ‘Project IAM Admin’ access on the new Service Management Project. This will give the Service Account access to create the identities, but for more detail on the permissions, you can use this link to look them up.

Next we need the Service Account to have access to create the identities in the GSuite. The below sets the Service Account in GCP ready to give access in the Admin portal of GSuite.

  1. Locate the newly-created service account in the table. Under Actions, click more the 3 dots at the end, then Edit.
  2. In the service account details, click the down arrow to see more Show domain-wide delegation, then ensure the Enable G Suite Domain-wide Delegation checkbox is checked.
  3. If you haven’t yet configured your app’s OAuth consent screen, you must do so before you can enable domain-wide delegation. Follow the on-screen instructions to configure the OAuth consent screen, then repeat the above steps and re-check the checkbox.
  4. Click Save to update the service account, and return to the table of service accounts. A new column, Domain-wide delegation, can be seen. Click View Client ID, to obtain and make a note of the client ID.


Now we connect these together, but giving the Service Account access in the GSuite Admin Portal.

  1. From your Google Workspace domain’s Admin console, go to Main menu menu> Security > API controls.
  2. In the Domain wide delegation pane, select Manage Domain Wide Delegation.
  3. Click Add new.
  4. In the Client ID field, enter the client ID obtained from the service account creation steps above.
  5. In the OAuth Scopes field, enter a comma-delimited list of the scopes required for your application (for a list of possible scopes, see Authorize requests).
    For example, if you require domain-wide access to Users and Groups enter:,
  6. Click Authorize.


At this point our Service Account has access to the GCP Account/Project and also has the access needed for the GSuite to create the identities. Therefore, we can start getting into the code to create these accounts.

To start with the SDK we need the Service Accounts JSON Key, which you can get by:

  1. In the Cloud Console, go to the Service Accounts page.
  2. Click Select a project, choose a project, and click Open.
  3. Find the row of the service account that you want to create a key for. In that row, click the More button, and then click Create key.
  4. Select a Key type and click Create.


Once you have downloaded the JSON File we can move to the Authentication in C#.

You will need to install the Google.Apis.Auth Nuget package to your project. There are then multiple difference methods to do this depending on how you are storing your JSON Key, but for my example we are injecting the JSON straight into the method, which we need the GoogleCredential.  The method we need to call is:


With gcpAuthenticationJson being the JSON string from the downloaded file. We also need to add scope to the request of access, which we can string together like below with these scopes required:

.CreateScoped(new List<string>

Now although we have given the Service Account all the permissions it requires to do the job, it needs to be executed by a GSuite Admin. We of course cannot have the admin logging in every time, therefore we just need the code to act as the admin. We can do this by adding an addition command to the methods:

.CreateScoped(new List<string>

We can of course make this a little more flexable as it can be reused for other authentications, so this is the method I would recommend:

publicGoogleCredential GetGcpCredential(string authJson,List<string> apiScopes=null,string adminEmail="")
 var googleCredential = GoogleCredential.FromJson(authJson)
 .CreateScoped(apiScopes ?? new List<string>


 return googleCredential;

From this can then create users with the SDK using this simple bit of code:

var directoryService = new DirectoryService( new BaseClientService.Initializer
                HttpClientInitializer = GetGcpCredential(authJson, apiScopes, userEmail)
                var request = directoryService.Users.Insert(userData);
                return await request.ExecuteAsync();

Can Project ARA work?

Just about all developers watched and followed the Google I/O 2016. You heard about the Allo, the Duo and the Google Home air freshener, but something they also squeezed in was a nod to Project ARA. I thought this was dead with no recent news, but they have brought life to the project again so I ask, can this idea work?

For those who don’t know about Project ARA, it is an idea from Google to build a modular phone. Their plan is to have a phone that you can create and be your own. All you will have to do is replace, upgrade and buy new modules for the phone to keep it running. If you want the new camera upgrade, then you don’t need to buy a whole new phone. You just need to pop to a store that sells the modules and then slot it in.

They also say on the Project ARA website, they are looking to expand to the Open Marketplace. This could mean they will expand to allow third parties to build for the ARA phone. Google said at the I/O that they plan for the phone to be on sale in 2017, so we don’t have long to wait. The question about the open marketplace would be if they will have enough companies building for it before it comes out. If the phone drops and there is nothing other than Google things build for it, then it will be a hard sell and an uphill battle to reach the general public.


Why Could It Succeed

Google are known for throwing ideas at the wall and seeing what sticks, so what makes this another egg at the wall and not the new best thing of 2017? I think a lot of it has to do with cost, flexibility and personable. The whole idea is to be able to swap out your modules whenever you want, which brings in the flexibility and the personalisation. Most phone contracts for the general public are 2 years, so when we see a new phone in the middle of this, all we can do is dribble. If they announce a new feature that can be added by a module, then you can get that upgrade then. This also means updates can come faster that rely on hardware. For example, if Apples iOS Force Touch just needs the newer hardware to run that feature, with this you could get told what modules you need to update to get that feature, then do it.

Speaking about another company, as said before they want to open the development of modules to other companies. This could be great to see what they build for the phone and what could be useful. Like the big hype is at the moment, you could have better fitness tracking or blood sugar reader for people with diabetes. The realms are limitless, only bound by how many custom modules you can fit on the phone. It would depend how much room the basic modules you need take up to then how many custom modules you want can get on the phone. The benefit of these being small, easy fit modules though, is they can all be in your pocket for an easy swap over. The phone would just be limited by the imagination of the companies making the modules and by the cost of them.

We would hope the modules don’t cost that much as you would probably want to buy a few at a time and get new ones frequently like apps. If these modules are expensive then people might think why not wait for the next best phone, which will have all the upgrades at once.

Buying the phone will be interesting as well, because you are going to be the creator of the phone. It would be cool if you can basically spec out your phones modules and then put a price to it. For example £200 for the basic phone then 5 X £50 for each module. If you wanted a cheaper phone, you could then either downgrade the modules or you could just get less modules. The flexibility of these devices and the pricing would bring smart phones to more people, while also spreading the rate of updating as well, if they do it right. I think these factors could make the project ARA a starting point for other manufactures to follow.


Why Would It Fail

Project ARA is so flexibly it is amazing, but do we really want it that flexibly. You and me will probably say hell yes, but a general public user which is the main stream manufacturers are trying to hit might not. Think about Microsoft App store, no one wants to build apps for them as no one really wants their phones. They have even had to Open Source and partner with companies like Xamarin to make it easier for developer to build for them.

Does the general user know about Camera or Speaker quality and specifications? No and they won’t want to learn about these technical things. You may also find that the sales people don’t know either. In university I applied to a phone shop sales job, told them I knew loads about the handsets and their OS, but was told you don’t really need to know them things, you just need to sell the phones. So how will they sell a phone and modules that they don’t even understand? I think it will be a hard sell to an average user unless it can be sold as a package. They just want a cool, fast phone with awesome gadgets.

Depending on that would then be interesting if the companies making the modules, or Google want to make modules, actually want to. If they can’t see potential of the average user buying their module, then why would they spend time and resource on the product?


Until It Begins

I think we will really have to wait and see how Google approaches this. If they can package it and sell it well to the general public, then the Open Market will be willing to put time and money to the project. If that all goes well then I see no reason why this could fail as it has what all people want, a flexible, personal and affordable phone. Either way I could see me getting this phone depending on the modules built and price.


Tell me what you think about Project ARA and how it will do when released?


SEO Tips to help you rank in all search engines

Below 10 SEO tips for both programmers and non techy people. Your knowledge doesn’t have to be great to get yourself seen by the top search engines. Most all SEO tips will work in the top search engines as all the search engines want to find you in the same way.

We will start with the non techy SEO tips first, then move on to what the developer can do. Firstly do remember no one can guarantee first page let alone first place. It is all up to the search engines algorithm and how you score on it.


(adsbygoogle = window.adsbygoogle || []).push({});

This is now the most important one that anyone can do. Search engines look at your content to see how relevant you are to what the user is searching. When you write your copy make sure it makes sense and is reinvent to you. Don’t write your copy for search engines, write it for your company. If you write it perfectly to describe what you can offer then you will get pick up on that. When developers say use keywords, they are the search terms you are trying to get searched on. So if I wanted to get searched on ‘developer’ then I would try to use that in most places, but in context and not over used. You can over do it and search engines could see that you are trying to flood your content with keywords.

Write good, relevant and in context content for yourself not for search engines, while trying to get as many keywords in as you can with out over doing it.


Meta data
This is a more developer thing, but you can make sure it is all in and the correct details are in. The main ones to get in are the Meta Title, Meta Description and Author. There are a few others plus you can get in a favicon. These detail won’t directly increase your ranking, but this information will show on the search results in search engines, and will give the user more information for when they are choosing a site to visit, which in turn will increase visits. If you have a WordPress or content management that allows you to edit these, then it will save you hiring a developer.

Make sure either you or your developer has all the relavent details in your meta data to display your information better on search engines and in turn improve your visit rate.


Social media
A big thing these days is getting on social media and rightfully you should be on there. If you share a post about your site, then that one person shares it with their friends and so on, then you have just reach a few 100 people. The other part to it is that when you are sharing you link then others share it, the link counts as a inbound link. The more inbound links you have going to your website from verified places the better. Although a link from Facebook may not be the most valued link, as so many people link from there, it counts as something, plus it can lead to more people sharing that link in Facebook and out.

Get on social media and start posting to your relavent users. If it’s for fun then go on twitter or Facebook. If you want to be a full fledged company then go on Facebook and LinkedIn. If you are any one then get on Google+ as that is where Google can get the most information about you and then rank you better.


News feeds
The main aim is to get people to your website and sharing your website, so a new feed, blog or keep upto date section on your site is a must. When you write posts, write them for the users reading them. If they are good enough then you will get people regularly coming back to read more posts which is good, and then if they share that post for others to read even better as that means more people coming in. The other reason for this is to keep your site active. If your website is a static website and nothing changes then for all the search engine knows, you have packed up. If they see you are constaintly updating your site and changing then they will come back to crawl your site for content.

Get a news feeds to interest users to return to your site and share it. Also so your website doesn’t become stagnant and keeps active.



(adsbygoogle = window.adsbygoogle || []).push({});

Link building
Linking building takes time, but is worth it if you get the result. Like the sections above, you want to get your name out there, get it shared and then get more inbound links to your website. As I also said you will get some value from social media inbound links, but you will get better value for your chosen industry if you post on things like forums, get news site to post about you and generally get your link on industry websites. The less the person has to do with you, but is in your industry the better it will be. This is because it means people are linking to you without having to know you. These kind of links would be better value then things like social media and non industry websites.

Get you link posted by others on industry relavent websites, forums and blogs, as much as possible. If not that then as close to it, by you posting on other forums.


Let’s get techy now with some developer tools for SEO.


Go through all your elements and make sure you have all the SEO friendly attributes in them. For example links should have ‘title’ attributes and images should have ‘alt’ tags. These will give the user and the search engines more information about them elements. Some new attributes as such are the Google Rich Text Snippts. This again won’t directly improve your website ranking, but it will give Google more information and shows more information in the search results. This will then entise the user more to click on your link.

Make sure your elements are displaying as much information for search engines and users to pick up on your website.


Element structure
Same as above it is to display as much information as possible to search engines to search on you. Some of the basic elements you should use are for the title a H1 tag. This then tells the search engine this is the most important title and therefore the title of the page, but don’t have to many. If you over load a page with them, search engines won’t know what is important and it could effect you negatively. The new elements you can use are the HTML5 elements like header, footer and nav. These are great for showing search engines the structure of the website. Research into which elements are industry standards to find out which to use, as with HTML5 you can use anything, but not everything is recognised by search engines.

Make sure you use the elements to direct the search engines to the right content, like H1 tags. Look at HTML5 elements to give more direction to your websites structure, but make sure they are search engine standard.


SEO tools
Use the resources that are at your disposal. There are hundreds tools to tell you errors, ranking and corrections. The best ones are below:

  • Google Analytics – See your websites rankings and who your audience is to better target them.
  • Google Webmaster – This tool can tell you if Google has had any crawling error and more, so you can make sure Google and other search engines are able to crawl you website.
  • W3C – This is like the web developers standards body and can check your HTML, CSS plus RSS feeds to make sure there is no errors.
  • IIS SEO – If your website is on a windows server and running IIS, then you can download this plug in for IIS. It will tell you for any website errors, duplicate content and some SEO advice as well.


Search engines want to give the user the best website with the best information. Therefore you need to have a fast website to get a better score with the search engines. Ways to accomplish this is to minify all your CSS and plugins that you won’t need to edit most of the time. Good code, by which I mean only using as much character/elements as needed and also on the server side of code make sure it is not bloated, so make more reusable functions. Another handy tool is Lazy.js, this JQuery plugin will make it so your images don’t load in until they are in view. This way on the first load it is not as heavy and the spreads the loading.

Make as much of your code smaller and image sizes smaller to speed up your website to get better scored by search engines. Read my previous post about coding to perfection for more detail.



(adsbygoogle = window.adsbygoogle || []).push({});

Readable code
One thing to avoid is having to many images instead of text. It may look better, but search engines don’t know what your image is. The alt tag of an image will tell search engines what the image is, but they won’t see it as important. The best thing is to code as much or all of the images as possible, so search engines have more content to read you on. This will also reduce the loading speed as you have less images to load.

Make sure you give the search engines as much to search you on as possible, so reduce the amount of images you use.

These tips can improve your website for not just the search engine but also for the users on your website. So get these done as soon as possible.

Social media, what are they for?

So when I do quotes for SEO I always tell people to get a social media as it is a great way to get your name out and around. When you do a post with your name or link on and it goes viral, you have struck gold, but depending on your companies business type, depends on what social media you want to be on.

If your not picky then I would say go for all of them, but if you want to focus on one or two applications then here is my optioned guide. When you choose a social media you have to think about who your audience is and who you want to reach. If you do just go for everything you can get your hands on, then it may work by luck, but it will be more work as you have to push harder to get your audiance. If however you choose your social media application depending on your purpose then followers and future customers will come flooding.

As most people I look at the big four Facebook, Twitter, LinkedIn and surprising to most Google+. The other social media groups are great and have their place like these, but as they are not as established to the general public, you may find it harder to get followers. So here we go….


(adsbygoogle = window.adsbygoogle || []).push({});


So as one of the first social medias to take off, it is here to stay. A lot of people have said Facebook is going, but I think too many people use it so religiously that it will never go. If you are trying to reach the fun, family and general kind of people then Facebook is for you. It is good you start a page and share that round as likes are worth quiet a lot in the world of reviews.

The problem with Facebook is you may not reach many people. Although you may have 100,000 followers, only about 20,000 of them see your post, which isn’t so terrible. Facebook only lets you see what you find interesting, so if you interact with a certain group, then that group will show more offen on your feed, but however if you stop interacting with a certain group or person then they will drop off. This means that your posts may only reach about 20% of your following army. You can pay for posts to go further, but many still may not see it.

Great for an all rounder, but not for the most professional of company’s to use. As you can see from mine, it is for friend, family and silly posting, but I do have a page that I push in the same way.

Page link.



Twitter is like Facebook, but has a different application that can increase traffic or get lost. Where Facebook monitor your posts, twitter let’s you have EVERYTHING. You feed is flooded with everything you follow, like or think about it seems. This is great as you know when someone follows you, they will see your post, but then they may not if it is over crowded by all their other posts. So I guess it depends how many other people they are following. 

For this reason I have had to go through and deselected some people off my post so that I can see what i want to see. When I follow I have to be careful to understand that I will get over attacked by their post, though also depend on how many time they are posting.

The good thing is that if you can deliver a great punchy post within the 140 cap then you can get the person interested to click through into your website. It is what Google call your micros to macros, all the small steps that lead to your end goal like a purchases.

As you can see from my account, I post quick, fun and silly things, but also repost a lot of interesting articles that I see on my feed.



This is the professional network here. When you join this, you can get connected to other big companies. The main benefit for this social media is to get your name out and show how good you are. I have used this as a professional place for me to give my industry opinion. If you find a group that is relevant to your company or purpose then you can comment on posts and forums, so other can see your level of skill or knowledge.

When you use this platform you need to keep active on forums to keep your name in circulation, else you will be forgotten. I also find if you want to keep upto date with people, the feed isn’t the greatest which means your followers could think the same of following you. The other problem I find is I am flooded by recruiters. I keep getting them trying to add me thinking I always want a new job, but it is an easy press to say no.

If you want your professional self online then go to LinkedIn. You can create professional relationships and get you industry experience out on the forums. Check out my account to see how I have been doing



This is the forgotten one and always the joke of the social media, but I disagree. I have been on it for a year or so now, but only recently been getting into it. This is already the best social media platform to be on either way as it’s part of google and that’s where you want to rank. They have better access to get more detail of you or your company and then this can link to your website. This can be what you want it to be as well. If you want it to be professional then you post about that and add people like that, but then there is an abundance of fun silly things as well. It also is like LinkedIn by telling you about people viewing you profile, but they just show your view count not the person. This has showed me as well that from me just posting on relevant groups my views jumped by thousands. This then shows me that there are a lot of people on there constantly, so I am getting more views which can result in more traffic.

Google+ is great for any one and is great at what it does. I would recommend this for anyone for anything. As faults go, there are some usability problems, but nothing stopping you spreading your name.

Check out my profile to see how I use it as well.



(adsbygoogle = window.adsbygoogle || []).push({});

The rest

As mentioned above, this is not all the great social media, but it’s the less specific ones. There are plenty of platforms for the right group. As an example, some of my other fravourites are below:

Musicians – SoundCloud

Photographers – instergram

Image bloggers – tumblr

President Google

I wonder if a company can get so powerful that it can take over a country, then the world? On the darker hand, can a company get so powerful it turns into Skynet? Both I hope are not true, but it does seem there are companies trying to reach these goals and one that is getting there in my eyes is Google. 

Google started as a small search engine company, which was amazing and they still amaze people everyday. I would put them up with Apple as a ruling company, by which I mean that they are a giant company to what people look to. You get companies that have such an impact on the smaller ones by the big company sets the craze and the standard to which the smaller company must follow to stay in the game. These ruling companies are slowly taking over all forms of tech and general living. Google I think is the biggest one though, as they have been buying so many companies and making so many things that they are everywhere and everyone needs them.

If you look at where they are now and want to be, you can see they are in everyone’s daily jobs, play and work. There web of products and services have grow like a chain reaction. See by the product flow below from start to now:


(adsbygoogle = window.adsbygoogle || []).push({});

Search engine

Google becomes the biggest search engine where people all look for information. There is no comparison due to the power they hold and the information they have gained. Even Bing tried to used there algorithm.

Google SEO

Everyone wants to be in the search engine so you optimise your site in line with Google, but no one cares about the other search engines like Bing and Yahoo. Even though they are big, they just don’t have the trust and information to compete.


You then need to know how you site is doing with the new SEO and with google, so everyone adds the Analytics code by them and now Google is in most every website and some apps. This means Google can source information about everything to do with you, your site and your users.


They then want to be everywhere you are and release an OS for phones that gives them extra reach past Apple to get their apps to you and you to give them more information. Apple dropped things like Google Maps, so now with there open source competitor OS they can get these kind of apps and data on more devices then other and Hereford to more consumers.


To get more information and get to where the user is at, they purchase the biggest video sharing company where billions of people go daily.


A tactical move to which Google create Google plus. I don’t think this would be as popular, not that it is that much anyway, if they didn’t put in place that you have to be a Google+ user to comment on a YouTube video. So now you have to be on there to be on YouTube fully, plus you want to be on there so Google can rank you and your site better on the search engine. I found when I search certain things, they show up first or better because Google has access to the Google+.

Self driving car

Now they know where you are and your behaviour, they want to take you to these places and be in your car. This shows how they are spending there wings to get everyone using some part of the company, which can spread to using all of the services. Just think if they build in connectivity with you Android phone, Google Glass or Google watch.

Google Glass

As well as being able to collect data from what you type, where you go and what you do, they also want to get what you see. With the Google Glass they can get even more in depth and personal data. Rumours of them selling data to the government, mean with this item they can see where you are and what you are doing potentially.

Fire alarms

Being in your browser, phone, tablet and your face isn’t enough, they buy out a fire alarm system so they can be in your home.

Google Watch *rumour

It may not be but they are rumoured to be doing a watch like the Gear, so they will be on you wrist. Like everyone though, I think they are just trying to get ahead of Apple before they release there version of a smart watch.

Project Tango *rumour

Project Tango is a rumour that they are going to try create a mini camera that can take so many pictures it can create a 3-D render of your environment. This is pretty cool and could help people like the blind, company tours and mapping, but then Google would know every inch of the world.

All of these plus more show that they have control and a hand in just about every aspect of your daily life. They will soon be the biggest company with the most knowledge of every person living in the world and soon space, which we all know knowledge is power. Though I say all of this, there is no evidence to say they are going to play Dr. evil and take over the world, it is just to say they will have the power.


(adsbygoogle = window.adsbygoogle || []).push({});

One rumour that was trashed was they had a server boat out at sea, so if any country told them to take down some information they didn’t want to, then they could say ‘sorry it’s not in your country so it is not up to you.’. Now that would be power to share information that corrupt governments would not like.

Even if you compare them to other giants like Apple and Windows, they trump them all. Windows has gone down hill since the 90’s due to them being late and rubbish to getting their own PCs and phones out, so Google and Appple trashed them in their markets. This is why Window is sticking with the PC software and phone hardware to keep in the game, which shows they are not really world ruling.

Apple, although seem Iike they could take on the world, they are very precise of what they are making and doing. They don’t just make things for the hell of it or make anything that could be crap. Apple will only send out items if they are perfect and they only do a selection of items, not trying to cover all bases like Googe. 

So as I say, I don’t think Google will invoke their huge power, but you never know and you would never see it coming…