SharePoint Power Hour: New Site Onboarding

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello welcome I'm Laura Rogers this is SharePoint power hour this is our weekly show Wednesdays at 11 I have Joelle Jobson here on audio hello everybody and today's topic is going to be SharePoint new site owner onboarding so there's a good bit of background around this now if you work at a really large global company a big company when you have programmers you might already have site aren't onboarding in place because programmers can create some custom processes and custom interfaces and hey you know have a some sort of special form people have to fill in before they can even create a site maybe where it goes through one place and then decide and all these things automatically get generated behind the scenes so this session is not for people who already have site on onboarding in place and you have some kind of custom site request process this is the opposite of a site request you're not having to request anything so in SharePoint and SharePoint Online you have a new site button that's there that people Clint click whenever they want to create a new site you have a new group button in Outlook you have a new team's button and teams you have a new planner button and planner so you have all these different directions people might come from and all those things result in a new SharePoint site getting created so people might have created a SharePoint site and they don't even know they created it they were just an Outlook and wanted to create a group of people that they could all email each other so this is based on the premise that you're not stopping them from creating a site you're doing an automated process after it gets created and that's actually Microsoft's best practice that you'll hear them say a lot is don't lock it down and prevent them from creating stuff just let them create it and because the alternative to that is if you lock all this stuff and prevent them they're going to go do something else they're gonna go just use Dropbox or they're gonna go just you slack they're just gonna find a way and do something else if you block them so try just not to block them let things occur and get created as they get created but this idea and this session is that we're going to just have a process so that you'll know when new sites get created and you can have some automation around that some information you want to tell the site owner and that kind of stuff so one of the fun things about Power Hour is that we have our little chat window so we have we use slack and wherever you're watching this video there's probably link it it's I to be mentored slack comm and if you're joining for the very first time it's got a little form to fill out to join but that's where our little live conversation is going so I've been kind of and I asked this on Twitter yesterday I'm gonna trying to get some ideas from people because like Matt said and the chat window site sprawl is a big problem well first of all you know is it a problem how much do you care how much do you want to control it and then kind of what exactly do you all want to do what ideally would you want to do with new site owners or tell new site owners because there are some automatic emails that go out when you create a new group and when you invite people to a new office 365 group you'll get a little generic welcome email and it tells them how to get to their site and how to put files in it so they've already they're already getting a little bit of basic information so the question here is first of all just let them create the stuff and then what do you want to happen now I've I some people an hour of the camp that you know let them create the sites who cares just let it become this long list of hundreds and hundreds of sites whatever and some people just kind of let go and just let it become that but some people are more maybe more like to be in control or more OCD like me and you like to know what the sites are for are they using them do they create it and forget about it the next day it's just sitting out there empty it's not hurting anything really if it's sitting out there empty but I like to kind of keep things neat and organized and not have a bunch of duplicates and not have a bunch of just long list of sites right so let's uh so let's talk about okay you were there that's cool you were so I did a session at ignite in November called what was it called quickly ramp up SharePoint site owners and I just put a link to it in the chat window and that was it just one of those little 20-minute theater sessions and I was just talking about just theoretically these concepts of what would you want to you know sites are going to appear everywhere what would you want to manage what do you want your site lifecycle to be and just kind of letting them educating them that they are a new site owner they may not even know that they have a site they may not have read the automatic welcome email do you want to make sure that they check for duplicates before they created it do you want to how long are you gonna need this new site or is it maybe just a test site do you have a secondary site owner should this site be added to one of the site hubs so just a lot of things to think about do you want do you have a training like do you have a specific training that you want all your site owners to go through or just even just some little quick 20-minute training to let them know some extreme basics about what what they're dealing with so just kind of think about that and so in the chat room I'm kind of Joel you're going to help me see what kind of ideas we're getting in here as I go through so I'll go ahead and go into my demo of what my solution is now the solution is not involve any programming it doesn't involve any anything going into Azure or PowerShell so this is more of something that just like a non non super tech like me just kind of semi power user potentially do now the thing is that we're starting so you have to have at least this first part is done in office 365 admin so at least have to have an admin do this for you but you're gonna have to to be notified about the site getting created in the first place the way I do it in this solution is to have an alert so I have this I went to alerts in protection at office comm go to the dashboard and go to activity alerts and I created an activity alert you can this is really neat I mean I did I think I did a whole other power hour about this where I did and went into reporting and alerts and stuff but this is where you can tell it that you want to be notified about certain things happening and it will just automatically send you an email so I just called it new site collection and I just said send this alert when and there are hundreds of activities you can pick from having to do a SharePoint and onedrive and flow exchange just everything in Office 365 so you could check multiple boxes I just created one based on created site collection somebody created a site collection and you'll even get these for onedrive because those are also site collections so who do you want alert to go to I'm just sending it to me probably in the real world you'd want this to go to maybe a shared mailbox and not just you personally but I'm just this is my test environment I'm just sending this alert to me to know when a new site gets created so then I'm going to base a flow off of that email arriving about the new site pretty cool okay so that's R it's based on that alert as soon as now this is not instantaneous this takes like 15 or 20 minutes so I created a couple of new sites and you know an hour an hour ago or so and it took it took them again like 15 or 20 minutes for each of these emails to come in so I'm not going to be creating new sites on the fly during this presentation because it just takes a while that's where it starts so you get the email it goes into other here let's see see these are the different names of the different alerts I have right so I have new site collection so Alex create a site collection and here's the URL to it and I think I did like three of them new site collection Billy okay so here's the email you get the only thing you know about the site it's not much it's who created it and what's the URL to the site that they created so it's not much to work with which is kind of frustrating but it gives us enough we can do some stuff to automate to have it go you know get kicked off with a flow so this email arriving is triggering a flow so I'm hesitating to show you this entire thing I might just start because it's it's kind of massive as to what I had to do so I might just kind of go through it I don't think I have time in an hour to start from scratch and build it all one at a time but I'm going to try to go through it in the easiest way that I can so and I'm gonna tell you about all these variables later because those are things that I just kind of realized later that I was going to need so it just starts when a new email arrives in my inbox and again you could do there's a trigger for a new email arriving in a shared mailbox so you don't have to have your own personal this going to your personal email so what I did was I put the subject filter is very specific no to notification for the alert news site collection because that is the exact subject of that email so only those emails are going to trigger this specific set of actions alright so then what we get again is just that email so the best thing to do best way to and again I'm initializing a bunch of variables that I'll tell you about later initializing them just means I have to say the they exist I'm taking the body of the email so new mail email arrives the body and I'm just converting it to text for this little HTML to text converter action because then it's a lot easier to read what's in it okay so then this parts kind of complicated and this part kind of gets into kind of messy complicated expressions and oops let me pull up another slide deck and the little interface here so let me I actually have a slide that exists in our power automate class that I'll just show you one side that will explain some of what I'm about to show you here because that's see that's kind of that's a bit much I gotta explain to you what it's gonna do so what I'm doing is after the email arrives I have to go find all these little specific things in it because this is what I'm dealing with just it's just text in the body of the email so I have to go find all these little spots and extract it so those of you who have taken my flow class this will probably be familiar because we have a few slides where we talk about going in and extracting specific text from from an email in a flow and we talked a good bit about you know how you could go about that let me go do that so it's it's getting the body and we can find this in my slides there we go okay I'm going to show you this one slide and break it down okay so in this example in my slide from my from my flow class power automate class I'm getting an email and I want to go find this one little specific thing in the email so whatever your specific thing little part of the email that you want to find you need to know in this case I need to know the ID which is this number but I need to know already know what's gonna come before it and what's going to come after it so in this expression I'm extracting out what's between the ID : and the little tilde here so I'm going to get this use this substring a expression I'm getting the substring of this thing that was just converted to text and I'm adding this number the index of where this ID colon is - and I'm I'm getting this number where the tilde is and I'm subtracting this number from this number so that gives me how long this is supposed to be and that gives me the exact substring that I'm getting between these two things so and that that's the reference of all those little expressions that I'm using the substring sub subtract add adds index of lasting index of so in this one and I'm also even wrapping it in a trim because that will just trim any whitespace off of it so I'll go grab all this and show you that because I'm doing that in several places in here then that's how I go extract all those little specific things out of the email when it arrives see put this in a notepad plus plus so I'm doing a trim substring the body of this HTML I'm adding the index of I'm so in this case I'm going to find the word user so look-see user : so I want to go get what's in between user : and item : and that will give me that person's email address so I want to go add so this is five characters see us er : is five characters so when I go get the index of that and then I'm subtracting the index of where the thing after that is and I'll go back to my email thing after it is item so I need the index of where item is so the index of item so then I'm subtracting one from the other and that the result of this expression is that it just gives me that person's email address that's fun right let's see you'll enjoying this so far okay so this is just kind of anytime you have an email or any time you want to do something with one of these alert emails this is the kind of thing you're going to have to do to be able to extract the specific information that you want out of out of that text so I'm doing that one and then I also need to get the site URL so for the site URL I'm getting what's in between item : and client and those are these are always going to be structured the same so I just need this will be in between these two things so that I'm doing the same thing and I'm going to get that item which is the site same exact concept and then I'm also getting the created so that's another one that's going to be in here time of activity and I'll show it show you in a minute why I need that but I'm getting this time of activity that's going to give me this date right here of when it was created because guess what the time it was created is not exactly the same time that the flow got kicked off that the email arrived because remember I said it takes fifteen or twenty minutes so I don't want to rely on a time that just whenever the email arrived I want to know exactly when the site got created so that's what I'm also getting in here I'm getting variable increase so I've got a variable user to let me know the person's email address then I'm getting the site URL and then I'm getting when it was created so all three of those I'm using the exact same concept of just getting that little substring in between two things and then I'm taking this variable wind created and I want it to be in my time zone because by default it's going to be UTC time zone so I'm taking this convert time zone action and just converting it from UTC to my time zone which is central and central time is going to be the time zone in my SharePoint site too all right let's see you all mine durable minds are blown right okay so then what do I have so far so let me show you what I have so far I'm gonna go to just up to the last time I ran it so you can see what data that I have so you'll understand why I had to keep going further to in order to get more information so a new email arrives of initially initializing a bunch of variables here's my converted text so see it's very simple just plain text that's the body of my email and then see there's my user so I set my variable user and I have him set my variable item that's my you that's the URL you'll follow me so far right and then that is when it was created so what I can do is I can I created this SharePoint site called sites owners and I'm just putting the URL of that site is just I just put that in the title field and then the site owner is just based off of that person's email address and I'm just putting in in the site owner field but that's the only data I have so far so you could just stop right now and just do whatever you want to with that amount of data that you have with just the site owner and the URL and you'd still be able to send them an email and let them know about their site or anything you want to do you could just have the next action be to send them an email but I wanted to know more information about the site itself so I wanted to have the name of the site the group ID the group email the site description maybe the template they used when they created it so additional information about the site other than than just these two things and that ended up being a huge pain because there is not an action and flow to go get me all the information about a site you can't just say here's a site get me all the data now the first thing I tried was the HTTP the SharePoint HTTP GET where you can go get just you know tap into the web services and go get information about a site that's the first thing I tried that didn't work because even though I'm a global admin I have god mode this is my demo tenant I don't have access to that new site that just got created so I can't even run the get HTTP GET command on it and get any information about the site it gives me access denied is that a pain or what so what I had to do you'll following me trying to recount some of your comments here okay so what I had to do was a whole bunch of extra just really really stupid amount of steps just to go get some additional information so this isn't you know this is really up to you it's not required that you do but I'll kind of tell you what I had to go through to do this so I I want to get the information about the office 365 group now this part is not gonna apply for communication sites for if they created a communication site I mean the only there's nothing I've been able to figure out for that so the only information you're going to have if it's a communication site is just their the site the site URL and their name so that's that's just kind of where I left off for communication sites but if it is an office 365 group so they created it as an actual team site then I'm using this action called get groups of a user so I'll uh I'll just go back to edit this so I take whoever this user was who just created a new site and I just go get all the groups that they're in and that is an azure ad action and then I go ahead and just create an item in SharePoint and I just fill in those two first fields the title which is just the site URL and the user so I'll just go ahead and get that knocked out and create it but I am gonna go fill in some additional information about it in a minute so this would if it was a communication site it still would have gotten this far and created the item let me see oh maybe I haven't created any communication sites so far okay okay so then it's going to get the group and then once I go and get the group let me tell you why this part was frustrating and I'll go into one I already did I'll go get the groups of a user and once I get the groups of a user this is what I have I have just a bunch of IDs this is all it gives me so I have no way of matching up just a URL to a group this groups information has no URL in it at all at all so again this is really kludgy because I have nothing to match up the groups the person is in with the site they just created because it's giving me a bunch of IDs and all I have is for the site is the URL so the way I did that was I go get the group and it gives me and this is getting every single group that that person is a member of by the way so this is the output it's giving me the ID the created date and time description display name mail etc so this is Stacy yes all this information is in the admin Center all this information is in all of your sites that are listed in the admin center this is just for an immediate action that you want to automatically happen when the site is created you can go in anytime in the admin center and see your list of sites and do stuff with it or export it or anything this is just to be triggered automatically and to get information about the site automatically so at least with the email you know to go look in the admin center maybe that's just all you want to do so this is just kind of steps that I took because I wanted to automatically have a SharePoint list of all my sites with all the information about them without having to do anything or go in the admin center does that make sense so yeah there's lots of information that you could get manually at any point so that's the whole point of this is just this is just what's happening automatically right when they create it okay so what I did was let me go back to edit to be able to act of those that list of groups that the person is a member of it's looking at now the name of the site I don't even have that either because from the initial data again I all I have is the URL and the person's name I don't even have the name of the site so the only piece of data I was able to extract that I can actually match up is this data about when the site was created and this data inside when it goes and gets a group it has a field in there of when it was created so I'm using that I'm getting this converted time zone and I'm saying that starts with this basically this time zone that the site was created so essentially it's looking through the list of all the groups the person is a member of and it's just going to find the one that has a create date at date time that matches the create date time that this alert came in right so again um okay so then once I have that then I have all this additional information let me show you what you have about that site once you do that so it's only gonna do go down this if yes if once they find that one correct site that matches okay so I've got let's go here get group okay so I've got the display name of the group the ID the group's email address the site description the privacy of the group see I've got whether it's email enabled or not whether it's security enabled see the visibility is the public or private and so this is all the data that I have about the group and then I can go do an update item action and go fill all that in in my SharePoint list over here so you can see that it filled in all this information alright so then if you want to now I didn't do anything with this list of members but I wanted to show you that you can't there are a couple of different ways you can get who the group members are and so there's an office 365 action called list group members and there's an azure ad get group members so I'm just I'm doing those actions but I'm not doing anything with the data so theoretically if you wanted to have all the lists of the members if you want to do something with those you could use either of those actions the azure connector is not premium Lisa but you have to be an admin to be able to use it so when I first add that connector into a flow you know it's looking at my authentication information and in my experience if I'm not a global admin it doesn't let me use it so for example I have a customer where I'm using this in one of the flows and they made me a global admin but it didn't work before that so I'm not sure granularly what other type of permission I might need to have somewhere in between just SharePoint administrator and global admin that that might give me the same thing but I know that global admins can have access to it so list group members though you can do this anybody can do this the office 365 actions you don't have to be an admin but the azure ones you do but it isn't but it isn't premium at least not talking about not last time I looked I I'm using this a sure thing in just my all my testing tenants and demo tenants and customers and stuff and the azure thing has never had any kind of special license it needs me to have just for the azure connector it's just having the permission having a global admin to be able to use it yeah so I again I can use either one of these let's go see what kind of data it gives us the list group members and get group members because you know you're gonna want to try these out just to kind of see what the data how useful it is so this one is giving me a bunch of information like all their data like their name their title and a bunch of stuff from their profile and that's what be that would be a list of a bunch of people that are in that group and this one kind of gives me the same stuff so either way but I had to use get groups of a user is an azure one that I had to use up here to get that list of groups in the first place and there isn't one like that for office 365 groups ok so then here's the fun part so send an email so let's go look at a couple of these I've had been sent just since this morning when I started testing it so congrats on creating your SharePoint site here's a quiz to take and it says here's your site and it's got a hyperlink to the site tells them a little bit about it so you don't want to get too overwhelming they're not gonna read it you know your people right they're not gonna read this so you want to make it as succinct as possible so I've just put some basic basic steps in this email so I put here's your here a few quick tips that are most these are the most important things you'll need to know when getting started with your site step 1 add members and I put these images just in SharePoint so it's just referencing them step 2 add files and it's just a picture of a library step 3 customize your homepage and step 4 a little bit of admin stuff if they want to know theirs usage but you you know obviously you can write your email to say whatever you want so that is what it's doing it's sending them this welcome email just the site owner what do you want to do after that so I send them this email let me go back to the edit mode here and I tell them to take a quiz so here is a form that I created just with Microsoft with forums and I created it as a quiz Stacy says anyone figured out how to automatically create a site from power-ups or flow without premium connectors joelle have you done site creation I think you have and yeah but it was with a premium hmm yeah it's the HTTP one you need not if you're doing sub sites which you shouldn't do anyway but if you're doing sub sites you can use the SharePoint one the SharePoint connector but if HTTP but if you need to create site collections you have to use the main HTTP which is premium good to know so I created this site owner quiz now I just as it's just just you know it's just a demo so I only created two questions but the idea here is that you can decide in your site owner quiz what you absolutely need them to know you can send them to a SharePoint page that has like some training or send them a word document or some send them the information you need them to know and study as a site owner the most essential information like permissions and stuff is important and then give them a quiz and so they have to take the quiz and then in this example I have it so that I have a different flow that runs after they take the quiz so I've only got two questions it's again just an example but I'm gonna look at these answers to the questions in this other flow site owner quiz answers and the trigger is when a new response is submitted to my site owner quiz I even did little points in here so see I put points 5 points 5 for each one so you can have it so they have to have a certain number of points this is not using the what's it called forms pro or anything like that so the data you get in flow is kind of painful to deal with so I just create a variable called score and now I've noticed that Microsoft forms it used to put when you do this get response details action and I did this a few months ago it used to automatically put it in a loop for no reason because it's just one response being submitted so I think that now when new flows are created and you do this it doesn't put it in a loop anymore but the loop is not for a purpose the loop here this apply to each is just it appeared there and I just went with it so it's just get response details from whatever they were you know responded to in the quiz and then I had to do all this manually so this is question one is the answer equal to site contents then I do in a variable increment my variable by five points and then for question two another condition is their answer to it highlighted content then I increment it by another score and then then I go to the site owners list and I go and get where site owner email equals whoever the person is so it's going to go find in this site owner list it's gonna go find all the items where the site owner equals the person who just took the test so that person might have multiple items in here and then it's going to put their score so it's gonna go ahead and just put their score in every single item in that so I ran this like a few months ago when there was only one item in here he took the quiz and it just put a his grade was five in here so I think so Alex just created once I'm logged in as Alex over here and I just wanted to show you real quick Alex got this walk welcome email when Billy Bob added him to the group so again there's already sort of a welcome process it's just this session this idea is that you could kind of create your own other than just the generic emails so let me go over to Alex here and Alex just got the email about his new site and I put the quiz first notice that because I want them to because they're not gonna read past you know one scroll so go ahead put the quiz first and then so let's see now I'm logged in this Alex here and I'm taking the quiz all right and I even you can even make the quiz so that only lost them to take it once or whatever okay so now let's go see what happens that should probably come in pretty quick yet ten seconds okay so now it found him and it updated his score and it put a ten in there so let's go look at this list here and look there's a quiz grade ten all right so then this is kind of where it gets to be more open and and what you know what you'd want it to do so Mandy says any chance to get some quiz templates look if you're a student in my own training site I've got quizzes but it's I don't have any kind of Microsoft forms like SharePoint quiz already built or anything I just created these two questions so it's really a I kind of wanted it to be what do you think is important for them to know and what like what's the most common least common thing people screw up in the sites in your in your environment so that you make sure that they learn you know all right so that that was the quiz and that gave him a score let me go back to the chat here let's see what else is going on in the chat Joelle that I might need to address about like what other things to do no I'm just low okay I don't think there really is yes so that is Mandy's last question which one I was gonna say my aunt said you try and show if it's possible at the site owner no if they don't create certain tasks by a certain date the site will be deleted yes that's kind of what I was getting at that we could do next what was the other one you were saying they're just Mandy's question about a quiz template oh yeah that's what I was talking about she was wondering if there is if you have any quiz templates no no I said I don't know um and Stacy says do they get the same quiz for every site they create um yeah but you could make it so that I don't see what you could do that I didn't do is that you could let's see instead of sending them a quiz you could just not send them a quiz at all if they've already taken it so one thing you could do would be in here you could have a variable that's got this verbage about the quiz you could create I'll keep drilling down like this thing and you could have that like in a string variable and then you before you send this you could go look at that sure point list and see if there's already an item in there where that person is the site owner and if there's already a quiz score then you could leave the variable empty otherwise put the variable that you know having this verbage in it so it makes sense so that's similar approaches to a new user added to a team or group I feel like for new users in a team or group that's the kind of thing that hopefully you're going to delegate to the owners and that's one of the things you need to impart to the owners that it's their job to they own this thing and it's their job to educate their users and help their users and put let the users know that they're they're the one to contact an or how to get help and stuff like that so now I haven't done anything around just all the end users they do get that little site welcome email but that's about it okay so now what do we do if they don't take the quiz so one thing we could do in SharePoint now this is a part where of Power Hour where I'm just gonna making something up but I did I did kind of want to see if you all want to gank the site back away from him if they don't get a certain score on the quiz so that's that's kind of what's the direction I'll go ahead and go you all let me know kind of what else that you'd want to happen but yeah um all right I'm gonna add a column date I'm gonna say quiz taken date and time okay now go back to so whenever they take the quiz then quiz taken can be like now that so then it applies that so then I'll go ahead and just run that on that last one that that just went and we should see it though it failed don'tdon't okay oh oh I didn't put the that's weird submission time here we go Lisa I don't know if you can do this if you're a global reader I'm not sure like like I said I was a SharePoint admin and it didn't work and then they get made me a global admin and it did work so I'm not sure kind of what in between I didn't test kind of all the different roles and things to see what would what we had to turn on to allow me to have that action unfortunately I have no idea it would be nice to know some kind of in-between role without having to be the global admin ok so now that ran and look at that so now I've got a quiz taken so now I know the date but I also have the date that it was created so we could do something like have a flow that goes and looks if people haven't taken the quiz yet maybe or you could even have like the quiz expires maybe a year later if their quiz taken date is you know over a year that it needs to to read credential yeah yeah ok so once a week or you know we do every day whenever you want to do it I'm gonna go look to the SharePoint list and get items and I need to know if they have not taken the quiz so I need to know if quiz taken is there quiz score zero maybe I might need to default that to zero the quiz grade because then I could just say it equals zero and then I wouldn't have to do is it null because that's a pain no because then they could actually take it and get a zero okay yeah I'll just look to see if it's null okay there's a way to do that okay so filter where and I have to go get the system name of that thing because I create it with spaces in it quiz taken this is my little just shortcut to do that there we go oh wait no quiz grade sorry that's the one I want quiz grade I can't put less than if it's empty I think the way I've had to do this before just to know if it was null is I had to just create a variable and just have nothing in it you all let me know if you have some other way of getting a null piece of information see there's nothing in this variable fair null and then site owners a queue and then I put there null oh it replaced the whole thing is grade thank you equals baron all there I wonder if I have to put that in quotes yeah we'll just try a couple things and that always works differently depending on what type of field it is to get untaken quiz people you like that name for a flow it's good okay all right I'm just gonna test that and run it it looks like it already let's see I love the way these scheduled ones they just have usually just Auto already just run no matter what you do even if you don't click to run it yeah I think it did my syntax wrong lists not found what I mean listen up phone so I typed it it jumped around and it put what I typed in there see I was in the middle of typing this and then it like put what I typed in this other one that's fun okay now try again so yeah we're gonna that's what we're gonna do is we're gonna take their side away from them haha is not valid yeah the expression oh it's because I put it in quotes oh and it's got to be a number see this has got to be a mmm because it's a number field oh my gosh I'm making this so painful for myself to or not Farren all cool barren all I might have to just either put something in it they haven't taken it yet or yeah that's good times oh holy cow oh it came back with nothing well at least didn't tear out that time Oh see look it changed my knoll to equal zero and none of them actually equal zero that's fine that's what I'm gonna do is I'm just gonna have go to share point it's it's numbers need to when you're dealing with numbers and share porn and flow they need to have a number and it needs to there needs to be a number there and any kind of automation you're around it is just usually horrible if you don't have a number in a number field ok so I went ahead and just put the default as zero and I'm just gonna put all these as zero because even if they did take the test and get a zero you still need to take their site away from them right there and you might want to say is there quiz score less than a certain number like less than 20 or you know whatever your total happens to be you could do that as well you just have to determine what you think their passing grade needs to be in order to still keep their site okay so now let me run it without having to do this null thing quiz grade equals zero that's so much easier oops not it took it out again there I think it's duck now it should return me a few people this time oh yeah that's true Betty said maybe default it to negative one yeah but I would still want to do the same thing to them if they took it and got a zero it's still not returning me any data though Oh righty so what do we do when we can't get it to filter query correctly we let it not filter them and go test it and see what the data looks like it's fun in troubleshooting right this is what we do when we do flow quiz grade 5 um okay I'm gonna put less than five quiz grade lt5 this is where Joelle I don't know if you found this with it find this every time you do flow that you end up losing hours and hours of your life because of just getting little things like this over and over again mm-hmm yeah definitely it's like some kind of little weird syntax thing or maybe I do need to have a variable that it's got a zero in it and it needs to look at the variable see like it's still anyway all right so what are we gonna do to the people who's who haven't you know passed the test so let's just move on to that real quick so we're only got a few more minutes um so that's gonna be our office 365 actions hours 365 group actions are we could do remove member from group so we can remove a member we can remove that person from the group we can remove everybody from the group we can go list all the group members and then remove every single one of them so just for fun let's group members oh you need to know the group ID so we need to know the group ID of the item that we just got fortunately I was storing that in a field in a column in that SharePoint list so that's something that's that's helpful to have right so for each item in the SharePoint list that doesn't have score of a certain value it's going to go list all the group members of that specific group ID and what do you want to do for all the group members that's really harsh to go remove them but this would be the same don't down the same group ID I just used right right here coupe ID and then who am i removing and I'm removing it see it's listing all the group members I'm moving each person so that's putting a loop inside of a loop too now I'm gonna try one more thing with this with this weird weirdness with the getting the items before I try that so they're zero make it an integer and put the value of zero where Chris quiz grade equals their zero right Stacey we're about to find find that out I've seen groups and not have an owner when someone left the company and it just was orphaned and had no one let me go test this we'll see if it will see if it doesn't like us removing all the people from groups oh it ran successfully except it didn't get any items that time I don't know that is odd cuz that is C quiz grade did it not finish saving this oh my gosh sure point oh sure point locked up and nothing had a zero in it isn't that perfect Joelle Joelle there's like a 10-second delay from you all Joelle seeing my screaming you all seeing my screen so none of these things had been actual zero in them so yeah cuz I hit exit quick at it and it was still just spinning Oh No so now they have quiz grades that explains why it wasn't returning anything I didn't I didn't need a variable equals zero let's see yeah it should get a few items this time there yes okay now it's see where it's gonna air out list group members ok what's the error this time resource not found ok so one of these if the site doesn't even exist anymore and that makes sense because this is just test stuff so let's go see that ones resource not found three four now I need to find one that I know does exist and see what exactly that it's having problems finding so this is where you spend a few more hours of your life you know troubleshooting flow ok so the one the ones that I got so we've got like a I'm looking at this raw data here group ID for a 4c two to three seven blah blah blah and then oh well yeah see they didn't all fail all right so they didn't all fail they only only the ones that the group didn't exist anymore they failed so that makes sense so this group ID got the group members and then the ones that I had deleted because I was testing the ones that didn't exist anymore those are the ones that air it out so this is a all the list of users the members that it gave me and then I said remove member from group and so for each person it looped through them all and removed them all from the group so now I'm going to go in as Billy and go let's see which which one is a site that exists that has quiz grade of zero IT Billy test site 90 Billy test site okay I'm gonna I'm logged in as Billy I'm gonna refresh this I want still Oh doesn't doesn't have any members listed but he's still technically on the site that is interesting yeah so that's the first time I've tried to just delete all the members of a group so the one of the next things again theoretically if you were gonna do this one of the next things you probably want to do is to tell the person first your site you know you haven't passed the quiz we're gonna remove your access to the site you might want to warn them before you just remove everything and then send them a warning email after a certain amount of time and then you know actually remove them from the site after a certain amount of time and then maybe even delete the site so I'm gonna flip back over to here all right so okay Lisa says I think you can't delete an owner without demoting them to a member well that's a good good point you could as part of this flow you can make yourself the admin make yourself an owner and then remove everyone except yourself but that again that's pretty harsh just taking the whole site away at least you're not deleting the whole site right so you're just kind of shocking them into now if they're not using it at all then they're not gonna notice and they're not going to care and then you could just have some other step that gives you an email send you an email and let you know - go ahead and delete it I don't think there's a whole delete site action in here I don't think there's a remove owner let me check real quick though they're the azure we look at the azure connectors as your ID I'll put group add user remove member from group it doesn't have anything about whether they're the owner or not so I think that when you get a group get the group members though it tells you what each person's role is going to be let's go look at that because that's important to know when it tells you their role list the group members let me go find one that didn't fail there we go okay it says user user user it doesn't say where there whether they're the owner sorry I know I'm not sharing my screen anymore it doesn't say in the flow whether the person's the owner or not when it's getting all the group members so but yeah that was hopefully you've got some ideas maybe and you can at least do that first step where you get notified about new sites or notified about anything at all that you're interested in happening you know anywhere in office 365 and now you know how to trigger a flow based off that email arriving and then being able to extract all little pieces out of it if you need to all right thanks everybody for watching check out all of our power apps and power automate and SharePoint training at iw mentor comm and I will see you next time bye [Music]
Info
Channel: Laura Rogers
Views: 2,332
Rating: 5 out of 5
Keywords: SharePoint, Microsoft, PowerApps, Office 365, Power Automate, Microsoft 365, Power Apps
Id: yZ00gPLU7Os
Channel Id: undefined
Length: 62min 49sec (3769 seconds)
Published: Wed Feb 05 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.