{"id":990,"date":"2021-01-08T13:20:02","date_gmt":"2021-01-08T12:20:02","guid":{"rendered":"http:\/\/www.vatland.no\/?p=990"},"modified":"2021-01-08T13:21:52","modified_gmt":"2021-01-08T12:21:52","slug":"get-tenantlistindb-from-previous-post","status":"publish","type":"post","link":"https:\/\/www.vatland.no\/index.php\/get-tenantlistindb-from-previous-post\/","title":{"rendered":"Get-tenantlistindb (from previous post)"},"content":{"rendered":"<p>Now that we have our tenants listed in a database table, listing them is quite easy.<br \/>\nAdded a switch that allow you to also list deleted\/removed tenants.<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:435px;\"><div class=\"text codecolorer\">function get-tenantlistindb {<br \/>\n&nbsp; &nbsp; param(<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; [switch]$all<br \/>\n&nbsp; &nbsp; )<br \/>\n&nbsp; &nbsp; $SQLInstance = &quot;localhost\\SQLExpress&quot;<br \/>\n&nbsp; &nbsp; $SQLDatabase = &quot;Microsoft365&quot;<br \/>\n&nbsp; &nbsp; $sqlqr = &quot;select * from [Microsoft365].[dbo].[tenants]&quot;<br \/>\n&nbsp; &nbsp; if (-not $all) {<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; $sqlqr += &quot; where active='1'&quot; <br \/>\n&nbsp; &nbsp; }<br \/>\n&nbsp; &nbsp; $tenants = invoke-sqlcmd -query $sqlqr -ServerInstance $SQLInstance -Database $SQLDatabase<br \/>\n&nbsp; &nbsp; $tenants<br \/>\n}<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Now that we have our tenants listed in a database table, listing them is quite easy. Added a switch that allow you to also list deleted\/removed tenants. function get-tenantlistindb { &nbsp; &nbsp; param( &nbsp; &nbsp; &nbsp; &nbsp; [switch]$all &nbsp; &nbsp; ) &nbsp; &nbsp; $SQLInstance = &quot;localhost\\SQLExpress&quot; &nbsp; &nbsp; $SQLDatabase = &quot;Microsoft365&quot; &nbsp; &nbsp; $sqlqr = &hellip; <a href=\"https:\/\/www.vatland.no\/index.php\/get-tenantlistindb-from-previous-post\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Get-tenantlistindb (from previous post)<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Get-tenantlistindb (from previous post)","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[72,74,2,48],"tags":[],"class_list":["post-990","post","type-post","status-publish","format-standard","hentry","category-azure","category-csp","category-development","category-powershell"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Now that we have our tenants listed in a database table, listing them is quite easy. Added a switch that allow you to also list deleted\/removed tenants. [cc language=&quot;powershell&quot;] function get-tenantlistindb { param( [switch]$all ) $SQLInstance = &quot;localhost\\SQLExpress&quot; $SQLDatabase = &quot;Microsoft365&quot; $sqlqr = &quot;select * from [Microsoft365].[dbo].[tenants]&quot; if (-not $all) { $sqlqr += &quot; where\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Atle\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.vatland.no\/index.php\/get-tenantlistindb-from-previous-post\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/get-tenantlistindb-from-previous-post\\\/#article\",\"name\":\"Get-tenantlistindb (from previous post) | Vatland\",\"headline\":\"Get-tenantlistindb (from previous post)\",\"author\":{\"@id\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/author\\\/atle\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.vatland.no\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/get-tenantlistindb-from-previous-post\\\/#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d04521cc752f433f129dc3c1b7a1d1944b9c79d16940acabef94e8ed7a6a1052?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Atle\"},\"datePublished\":\"2021-01-08T13:20:02+01:00\",\"dateModified\":\"2021-01-08T13:21:52+01:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/get-tenantlistindb-from-previous-post\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/get-tenantlistindb-from-previous-post\\\/#webpage\"},\"articleSection\":\"Azure, CSP, Development, Powershell\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/get-tenantlistindb-from-previous-post\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.vatland.no#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.vatland.no\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/category\\\/development\\\/#listItem\",\"name\":\"Development\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/category\\\/development\\\/#listItem\",\"position\":2,\"name\":\"Development\",\"item\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/category\\\/development\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/get-tenantlistindb-from-previous-post\\\/#listItem\",\"name\":\"Get-tenantlistindb (from previous post)\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.vatland.no#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/get-tenantlistindb-from-previous-post\\\/#listItem\",\"position\":3,\"name\":\"Get-tenantlistindb (from previous post)\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/category\\\/development\\\/#listItem\",\"name\":\"Development\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.vatland.no\\\/#person\",\"name\":\"Atle\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/get-tenantlistindb-from-previous-post\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d04521cc752f433f129dc3c1b7a1d1944b9c79d16940acabef94e8ed7a6a1052?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Atle\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/author\\\/atle\\\/#author\",\"url\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/author\\\/atle\\\/\",\"name\":\"Atle\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/get-tenantlistindb-from-previous-post\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d04521cc752f433f129dc3c1b7a1d1944b9c79d16940acabef94e8ed7a6a1052?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Atle\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/get-tenantlistindb-from-previous-post\\\/#webpage\",\"url\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/get-tenantlistindb-from-previous-post\\\/\",\"name\":\"Get-tenantlistindb (from previous post) | Vatland\",\"description\":\"Now that we have our tenants listed in a database table, listing them is quite easy. Added a switch that allow you to also list deleted\\\/removed tenants. [cc language=\\\"powershell\\\"] function get-tenantlistindb { param( [switch]$all ) $SQLInstance = \\\"localhost\\\\SQLExpress\\\" $SQLDatabase = \\\"Microsoft365\\\" $sqlqr = \\\"select * from [Microsoft365].[dbo].[tenants]\\\" if (-not $all) { $sqlqr += \\\" where\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.vatland.no\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/get-tenantlistindb-from-previous-post\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/author\\\/atle\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.vatland.no\\\/index.php\\\/author\\\/atle\\\/#author\"},\"datePublished\":\"2021-01-08T13:20:02+01:00\",\"dateModified\":\"2021-01-08T13:21:52+01:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.vatland.no\\\/#website\",\"url\":\"https:\\\/\\\/www.vatland.no\\\/\",\"name\":\"Vatland\",\"description\":\"-MS Stuff-\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.vatland.no\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Get-tenantlistindb (from previous post) | Vatland","description":"Now that we have our tenants listed in a database table, listing them is quite easy. Added a switch that allow you to also list deleted\/removed tenants. [cc language=\"powershell\"] function get-tenantlistindb { param( [switch]$all ) $SQLInstance = \"localhost\\SQLExpress\" $SQLDatabase = \"Microsoft365\" $sqlqr = \"select * from [Microsoft365].[dbo].[tenants]\" if (-not $all) { $sqlqr += \" where","canonical_url":"https:\/\/www.vatland.no\/index.php\/get-tenantlistindb-from-previous-post\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.vatland.no\/index.php\/get-tenantlistindb-from-previous-post\/#article","name":"Get-tenantlistindb (from previous post) | Vatland","headline":"Get-tenantlistindb (from previous post)","author":{"@id":"https:\/\/www.vatland.no\/index.php\/author\/atle\/#author"},"publisher":{"@id":"https:\/\/www.vatland.no\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/www.vatland.no\/index.php\/get-tenantlistindb-from-previous-post\/#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/d04521cc752f433f129dc3c1b7a1d1944b9c79d16940acabef94e8ed7a6a1052?s=96&d=mm&r=g","width":96,"height":96,"caption":"Atle"},"datePublished":"2021-01-08T13:20:02+01:00","dateModified":"2021-01-08T13:21:52+01:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.vatland.no\/index.php\/get-tenantlistindb-from-previous-post\/#webpage"},"isPartOf":{"@id":"https:\/\/www.vatland.no\/index.php\/get-tenantlistindb-from-previous-post\/#webpage"},"articleSection":"Azure, CSP, Development, Powershell"},{"@type":"BreadcrumbList","@id":"https:\/\/www.vatland.no\/index.php\/get-tenantlistindb-from-previous-post\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.vatland.no#listItem","position":1,"name":"Home","item":"https:\/\/www.vatland.no","nextItem":{"@type":"ListItem","@id":"https:\/\/www.vatland.no\/index.php\/category\/development\/#listItem","name":"Development"}},{"@type":"ListItem","@id":"https:\/\/www.vatland.no\/index.php\/category\/development\/#listItem","position":2,"name":"Development","item":"https:\/\/www.vatland.no\/index.php\/category\/development\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.vatland.no\/index.php\/get-tenantlistindb-from-previous-post\/#listItem","name":"Get-tenantlistindb (from previous post)"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.vatland.no#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.vatland.no\/index.php\/get-tenantlistindb-from-previous-post\/#listItem","position":3,"name":"Get-tenantlistindb (from previous post)","previousItem":{"@type":"ListItem","@id":"https:\/\/www.vatland.no\/index.php\/category\/development\/#listItem","name":"Development"}}]},{"@type":"Person","@id":"https:\/\/www.vatland.no\/#person","name":"Atle","image":{"@type":"ImageObject","@id":"https:\/\/www.vatland.no\/index.php\/get-tenantlistindb-from-previous-post\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/d04521cc752f433f129dc3c1b7a1d1944b9c79d16940acabef94e8ed7a6a1052?s=96&d=mm&r=g","width":96,"height":96,"caption":"Atle"}},{"@type":"Person","@id":"https:\/\/www.vatland.no\/index.php\/author\/atle\/#author","url":"https:\/\/www.vatland.no\/index.php\/author\/atle\/","name":"Atle","image":{"@type":"ImageObject","@id":"https:\/\/www.vatland.no\/index.php\/get-tenantlistindb-from-previous-post\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/d04521cc752f433f129dc3c1b7a1d1944b9c79d16940acabef94e8ed7a6a1052?s=96&d=mm&r=g","width":96,"height":96,"caption":"Atle"}},{"@type":"WebPage","@id":"https:\/\/www.vatland.no\/index.php\/get-tenantlistindb-from-previous-post\/#webpage","url":"https:\/\/www.vatland.no\/index.php\/get-tenantlistindb-from-previous-post\/","name":"Get-tenantlistindb (from previous post) | Vatland","description":"Now that we have our tenants listed in a database table, listing them is quite easy. Added a switch that allow you to also list deleted\/removed tenants. [cc language=\"powershell\"] function get-tenantlistindb { param( [switch]$all ) $SQLInstance = \"localhost\\SQLExpress\" $SQLDatabase = \"Microsoft365\" $sqlqr = \"select * from [Microsoft365].[dbo].[tenants]\" if (-not $all) { $sqlqr += \" where","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.vatland.no\/#website"},"breadcrumb":{"@id":"https:\/\/www.vatland.no\/index.php\/get-tenantlistindb-from-previous-post\/#breadcrumblist"},"author":{"@id":"https:\/\/www.vatland.no\/index.php\/author\/atle\/#author"},"creator":{"@id":"https:\/\/www.vatland.no\/index.php\/author\/atle\/#author"},"datePublished":"2021-01-08T13:20:02+01:00","dateModified":"2021-01-08T13:21:52+01:00"},{"@type":"WebSite","@id":"https:\/\/www.vatland.no\/#website","url":"https:\/\/www.vatland.no\/","name":"Vatland","description":"-MS Stuff-","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.vatland.no\/#person"}}]}},"aioseo_meta_data":{"post_id":"990","title":null,"description":null,"keywords":[],"keyphrases":{"focus":[],"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[],"defaultGraph":"","defaultPostTypeGraph":""},"schema_type":"none","schema_type_options":"{\"webPage\":{\"webPageType\":\"WebPage\"},\"article\":{\"articleType\":\"BlogPosting\"},\"book\":[],\"course\":[],\"event\":[],\"jobPosting\":[],\"music\":[],\"person\":[],\"product\":[],\"recipe\":[],\"restaurant\":[],\"service\":[],\"software\":[],\"video\":[]}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":{"businessInfo":{"name":"","urls":{"website":"","aboutPage":"","contactPage":""},"address":{"line1":"","line2":"","zip":"","city":"","state":"","country":""},"contact":{"email":"","phone":"","fax":""},"ids":{"vatID":"","taxID":"","chamberID":""},"payment":{"priceIndication":"","currenciesAccepted":"","methodsAccepted":""},"areaServed":""},"openingHours":{"show":false,"closedLabel":"","open24h":false,"open24hLabel":"","open247":false,"use24hFormat":false,"twoSets":false,"timezone":"","hours":[]}},"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-01-08 12:15:20","updated":"2025-06-04 03:23:12","seo_analyzer_scan_date":null},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":false,"jetpack-related-posts":[{"id":1018,"url":"https:\/\/www.vatland.no\/index.php\/use-get-tenantlicsindb-after-syncing-them-to-our-local-db\/","url_meta":{"origin":990,"position":0},"title":"Use get-tenantlicsindb after syncing them to our local db.","author":"Atle","date":"January 31, 2021","format":false,"excerpt":"Ok, Now that we have syncronized our customers licenes to a local DB, we have this new commandlet to list them. This is a easy one, no advanced tokens setup to connect to Microsoft endpoint, only local database. [cc language=powershell] function get-tenantlics { [CmdletBinding()] param( [int]$lastndays = 1 ) DynamicParam\u2026","rel":"","context":"In &quot;Azure&quot;","block_context":{"text":"Azure","link":"https:\/\/www.vatland.no\/index.php\/category\/azure\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1043,"url":"https:\/\/www.vatland.no\/index.php\/list-user-and-license-in-database\/","url_meta":{"origin":990,"position":1},"title":"List users and licenses in Database","author":"Atle","date":"March 26, 2021","format":false,"excerpt":"Now that we have a database containing user, tenant and license it would be nice to have a function\/command to list this. Took me a while to figure it out but thanks to Bing, I prefer Bing before google. I sync my database on a schedule once a day. This\u2026","rel":"","context":"In &quot;CSP&quot;","block_context":{"text":"CSP","link":"https:\/\/www.vatland.no\/index.php\/category\/csp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1010,"url":"https:\/\/www.vatland.no\/index.php\/add-tenant-licenses-from-csp-to-database\/","url_meta":{"origin":990,"position":2},"title":"Add tenant licenses from csp to database.","author":"Atle","date":"January 17, 2021","format":false,"excerpt":"This is a followup from previus post. In this post I will populate the database with what licenses a tenant has aquired. This will add records of what aquired skus and 'usage'. For me this is how many license are bought versus how many are assigned. This does not account\u2026","rel":"","context":"In &quot;Azure&quot;","block_context":{"text":"Azure","link":"https:\/\/www.vatland.no\/index.php\/category\/azure\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":975,"url":"https:\/\/www.vatland.no\/index.php\/log-tenants-from-office-365-to-local-db\/","url_meta":{"origin":990,"position":3},"title":"Log tenants from office 365 to local Db","author":"Atle","date":"January 3, 2021","format":false,"excerpt":"Hi, I like to keep control of how many licenses our cutomers use versus how many\u00a0 have been purchased. Here is 1st part\u00a0 my PS script to copy the info from csp to the DB. I will start creating a database and table to keep a list of all the\u2026","rel":"","context":"In &quot;Azure&quot;","block_context":{"text":"Azure","link":"https:\/\/www.vatland.no\/index.php\/category\/azure\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1020,"url":"https:\/\/www.vatland.no\/index.php\/import-user-licenses-from-csp-using-csp-api-and-graph\/","url_meta":{"origin":990,"position":4},"title":"Import user licenses from CSP using CSP api and graph.","author":"Atle","date":"January 31, 2021","format":false,"excerpt":"Hi,there.This is also quiet simple. I want to get all users and what licenses they have been assigned. All this should do, is retrieve information using a csp token.After some attempts this is my best one. The \"goodlooking\" argument will not work when run from ISE.I'am still using the same\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":899,"url":"https:\/\/www.vatland.no\/index.php\/csp-access-to-tenants-using-powershell-part-2\/","url_meta":{"origin":990,"position":5},"title":"CSP access to tenants using powershell. Part 2","author":"Atle","date":"September 20, 2019","format":false,"excerpt":"In part 1 we created the Azure Enterprise App for Partnercenter and used this information to connect using powershell and connect-partnercenter. Now we will use this to connect to one of our customers tenants. First we will use AZ module and connect-azaccount. We will use the AZ module and the\u2026","rel":"","context":"In &quot;Azure&quot;","block_context":{"text":"Azure","link":"https:\/\/www.vatland.no\/index.php\/category\/azure\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/posts\/990","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/comments?post=990"}],"version-history":[{"count":4,"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/posts\/990\/revisions"}],"predecessor-version":[{"id":994,"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/posts\/990\/revisions\/994"}],"wp:attachment":[{"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/media?parent=990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/categories?post=990"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/tags?post=990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}