Posts

Dataverse D365 REST Web Api using client secret From Postman or Power Automate desktop (PAD)

Image
  How to call Dataverse REST Web Api from postman or power automate desktop. Note:  <Value>: Either custom value or value from previous steps. What do we need? - Postman:  Download Postman | Get Started for Free - PAD:  Install Power Automate - Power Automate | Microsoft Learn - D365 environment URL - O365 Entra/*Global admin.   ----X---- Let's get started. Register an app using MS Entra Platform:  Go to: https://entra.microsoft.com/ -> Identity -> Applications -> App registrations -> New registration Official link: https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app   Name: <Provide Name> Supported account types: Single tenant. Redirect URI: https://localhost Update Manifest file: Set oauth2AllowImplicitFlow to true. Grant Permission to access Dataverse (AKA Dynamic CRM) API Permissions -> "+ Add a permission" "User_impersonate" -> "Add permissions" Grant API Permissions (Note: Only Global ad

How to call SharePoint online rest APIs using postman?

How to call SharePoint online rest APIs using postman? Step 1: Install Postman:  https://www.getpostman.com Step 2: Generate Client ID and Client Secret               Use below URL (Update Initial part):               <SPO Site Collection URL>/_layouts/15/appregnew.aspx               Note :                You can visit below URL to see all registered apps.                 <SPO Site Collection URL>/_layouts/15/AppPrincipals.aspx Step 3: Grant correct permissions to app and authorize it.                Use below URL (Update Initial part) : <SPO Site Collection URL>/_layouts/15/appinv.aspx Example of  permissions XML : Full control on site collection (Please do not change site collection URL or any part from below XML. and please google for more permissions XML like only web/list access with read/write permissions) <AppPermissionRequests AllowAppOnlyPolicy="true"> <AppPermissionRequest Scope=" http://sharepoint/co

Chrome Extension to auto refresh Power BI report.

Chrome Extension to auto refresh Power BI report. Requirement  :  Power BI report will be visible on monitor/projector and team will monitor it live. Report needs to refresh on it's own every 5 seconds. Power BI : We created report with SQL direct query so report shows current data when accessed or clicked refresh on report. https://docs.microsoft.com/en-us/power-bi/desktop-use-directquery Solutions : #1 :  Refresh full page every x seconds https://chrome.google.com/webstore/detail/auto-refresh/ifooldnmmcmlbdennkpdnlnbgbmfalko?hl=en-US Issues with above solution : Extension refreshes full page (browser refresh) so screen becomes blank for second(s). If user want to click on report and see the data, it can cause issue if page refreshes at same time. #2 : Created new chrome plug in / Extension so it will click refresh button after N (seconds) interval, so it will only make AJAX call and refresh report data (not entire page). https://chrome.google.com/webstor

How to update Site collection audit settings for SharePoint online with Powershell

How to update Site collection audit settings for SharePoint online with document library ? Prerequisite 1 : Install SharePoint Online Management Shell (Google term if below link breaks) https://www.microsoft.com/en-us/download/details.aspx?id=35588 FYI : AuditMaskType enumeration : https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-server/mt125231(v=office.15) ID Microsoft.SharePoint. Client.AuditMaskType Enum Value UI Options 1 All -1 Not available from UI 2 CheckIn 2 Checking out or checking in items   3 CheckOut 1 Checking out or checking in items   4 ChildDelete 64 Not available from UI 5 Copy 2048 Moving or copying items to another location in the site   6 ObjectDelete 8 Deleting or restoring items   7 Move 4096 Moving or copying items to another location in the site   8 None 0 Not available

Iterate through all SharePoint web-applications, site-collections, websites from PowerShell

Iterate through all SharePoint web-applications, site-collections, websites from PowerShell Please do not forget to comment if this helps. PS : $contentWebAppServices = (Get-SPFarm).services |  ? { $_.typename -eq "Microsoft SharePoint Foundation Web Application"} foreach($webApp in $contentWebAppServices.WebApplications) { try { if ($webApp.Url -ne "If you want to skip something") { write-host "Starting WebApplications : " + $webApp.Url foreach($siteColl in $webApp.Sites) { try { write-host "Starting SiteCollection : " + $siteColl.Url $site = Get-SPSite $siteColl.Url if ($site.Allwebs.Count -gt 0) { foreach($web in $site.Allwebs) { //Code for each web } } } catch [Exception] { write-host "Error in Code for : " $siteColl.Url } } } } catch [Exception] { write-host "Error in Code for : &q

Open SharePoint Online site in SharePoint Designer with MFA (Multifactor authentication)

Image
How to open SharePoint online site in SharePoint Designer with MFA ? (Multi-factor authentication) Please do not forget to comment if this helps. Issue : SharePoint Designer does not support MFA Solution : While setting up MFA with O365, you must have received App password . Please use App password instead of regular network password/one time password. What if you don’t have/remember  App password  ? Please follow below steps to generate new  App password and use it for SPD. 1. Log into O365 from https://portal.office.com/ 2. Go to  https://account.activedirectory.windowsazure.com/r#/applications 3. Click of your name from right top -> "Profile" -> "Additional security verification" 4.   Go to tab “App Passwords” (Hidden tab : Follow screen shot) 5. Now you can create new  App password , just give a name and use it as you SPD password(you can also delete old if no longer required.) Keep app password

Sharepoint : get all sites where feature is active at site or web level

Sharepoint : get all sites where feature is active at site or web level Please do not forget to comment if this helps. Get all Site Colletions where GUID matched to site colleation feature Get-SPSite -limit ALL | foreach{ $_.features["GUID"] } | select Parent Get all Webs where GUID matched to web feature Get-SPSite -limit ALL | Get-SPWeb -limit ALL | foreach{ $_.features["GUID"] } | select Parent