Microsoft 365 Developer Podcast – Code Like a Pro in C# with Jort Rodenburg

This article is contributed. See the original author and article here.

Paul talks with Jort Rodenburg about his new book Code Like a Pro in C#.


https://www.podbean.com/player-v2/?i=8r4nz-107ff8f-pb&from=pb6admin&share=0&download=0&rtl=0&fonts=Courier%20New&skin=1&font-color=auto&btn-skin=6


Listen to the show here: Code Like a Pro in C# with Jort Rodenburg (m365devpodcast.com) 


Links from the show:



Microsoft News



Community Links


Monitoring quotas programmatically

Monitoring quotas programmatically

This article is contributed. See the original author and article here.

Harish Bannai, Senior Azure Cloud Engineer


Jonathan Wang, Customer Engineer II


 


 


Some Azure services have adjustable quota limits. Monitoring these quota limits is critical for keeping mission-critical applications and services up and running. In this blog, we walk through the steps to use a custom script that monitors quotas for Azure services creates a support ticket leveraging the Azure Support REST API.


 


Step 1: Configure authentication for your app


 


Configure your app to use the Microsoft Identity Platform  (Azure AD) as the authentication provider. You can register the application using the Azure portal or Azure CLI.


 


Register your app with the Azure portal


 



  1. Follow these steps to register your app in the Azure portal.

  2. In Azure Active Directory click App registration, click on the application you’re registering to display its properties. You will see something like this:


pilara_0-1625517618667.png


 



  1. Make a note of the Object ID and Directory (tenant) ID values.


 


Register your app using Azure CLI


 


To register your app using Azure CLI, run the following command to obtain the Object ID and Directory (tenant) ID values:


 


get-azureadapplication -objectId

 


Step 2: Register the resource provider (RP)


 


Register the Azure resource provider (RP) for the service of the quotas you want to monitor. For example, if the RP is Microsoft.Compute, you register it as follows:


 


Register-AzResourceProvider -ProviderNamespace Microsoft.Compute


You will get this result:


 


 

ProviderNamespace : Microsoft.Compute
RegistrationState : Registered
ResourceTypes     : {availabilitySets, virtualMachines,
                    virtualMachines/extensions,
                    virtualMachineScaleSets…}
Locations         : {East US, East US 2, West US, Central US…}

 


 


Step 3: Monitor your quotas programmatically


 


Use this script to monitor and create a support case. Pass the values for  Subscription ID, Object ID, and Directory (tenant) ID obtained in the previous steps to the GetAzLimit.ps1 script to monitor quotas and auto-create the support case.


 

Help us shape the future of education with Microsoft Learn!

Help us shape the future of education with Microsoft Learn!

This article is contributed. See the original author and article here.

LeeStott_0-1625507271511.png


 


We are a MSc student research team from Imperial College Business School London

Team members Bastian Drengemann, Mats BrandtBartolomeo PoggiLara Hartmann, and Phillip Zimmer and we are eager to understand your perspective on Microsoft Learn and the Learning Tools Interoperability (LTI) application as student or faculty. During the next weeks, we are working closely with the Microsoft Learn LTI Open Source Team to help shape the future of education tool with Microsoft Learn. 


Microsoft Learn is a free, online training platform that provides interactive learning resources for Microsoft products and cutting edge technologies. The goal is to empower students and educators to learn about technology through fun, guided, hands-on content aimed at specific learning goals.  


 


To bring Microsoft Learn’s content into the classroom, an LTI application enables you to seamlessly blend self-paced learning content from the Microsoft Learn catalog with your curriculum and Learning Management System (LMS). 


 


Click here to find out more: https://github.com/microsoft/learn-lti  



And click here to access the surveys:
 


For institutions: IT administrators and educators (5min) 


For students (3min) 



Your insights are key to understand how Learn and LTI can enter the classroom and how they offer value to a blended learning curriculum. Do you want to participate in building future learning paths? Do you want to express how you see the future of higher education?

Let us know how we can empower you as an educator or student! Click on the survey links now.
 

Update- Beta program for SQL Server on Windows container is suspended.

This article is contributed. See the original author and article here.

As you may be aware, the SQL Server on Windows Containers Beta program began in 2017. It has remained in Beta mode meant for only test and development environment until now. , due to the existing ecosystem challenges and usage patterns we have decided to suspend the SQL Server on Windows Containers beta program for now.


 


Hence with immediate effect, the docker hub repos  “microsoft/mssql-server-windows-express” and


microsoft/mssql-server-windows-developer” and the tags within these repos will be deleted and images from these repos will not be available for download going forward.  We look forward to your continued support and feedback to help us improve.


 


SQL Server on Linux containers continue to be supported for production environment. This announcement only affects SQL Server on Windows container that was in Beta mode until now. 


 


Thanks,


Amit Khandelwal 


Senior Program Manager

Learning from Expertise #3: Why cannot remove AD Admin or set a new one on Azure PostgreSQL Server?!

Learning from Expertise #3: Why cannot remove AD Admin or set a new one on Azure PostgreSQL Server?!

This article is contributed. See the original author and article here.

Overview:


We see customers were not able to delete the AD Admin user in Azure database for PostgreSQL, and after triggering the operation , the request keep running forever without any error message or it fails with error like:


‘The user name conflict with an existing database user name’ is not a valid name because it contains invalid characters.

 


Solution:


In this scenario, most properly the operation stuck because there is a dependent objects on the AAD role, so you will need to remove these dependencies first , so log in with your server admin user and check the object dependency using the following query:


Ahmed_S_Mahmoud_0-1625481541648.png


Note:- 


— make sure to run this query against all databases.


— Replace ### with AAD admin User or group.


 

WITH myconstants (MyUser, ExcludeUser) AS (
    values ('', 'azure_superuser')
)
SELECT
    n.nspname AS schema_name,
    c.relname AS rel_name,
    c.relkind AS rel_kind,
    pg_get_userbyid(c.relowner) AS owner_name
  FROM myconstants, pg_class c
  JOIN pg_namespace n ON n.oid = c.relnamespace
  WHERE
        pg_get_userbyid(c.relowner) NOT LIKE concat('%',ExcludeUser,'%')
    AND
        pg_get_userbyid(c.relowner) LIKE concat('%',MyUser,'%')
UNION ALL
SELECT
    n.nspname AS schema_name,
    p.proname,
    'p',
    pg_get_userbyid(p.proowner)
 FROM myconstants, pg_proc p
  JOIN pg_namespace n ON n.oid = p.pronamespace
  WHERE
        pg_get_userbyid(p.proowner) NOT LIKE concat ('%',ExcludeUser,'%')
    AND
        pg_get_userbyid(p.proowner) LIKE concat('%',MyUser,'%')

 


To mitigate this issue, you will need to change the ownership of these object to other new/existing user and retry the operation:


 

REASSIGN OWNED BY "###" TO "local database user";

 


 

DROP OWNED BY "###";

 


For more details, please check out PostgreSQL documentation:


PostgreSQL: Documentation: 11: REASSIGN OWNED


In case, after you cleaned the dependences to AAD Admin and you want to set the AD Admin again but it fails again with error


 

'The user name conflict with an existing database user name' is not a valid name because it contains invalid characters.

 


As a workaround, you can assign the AAD admin role to another AAD admin user and then you will be able to do the override. by then you should be able to reset the AAD admin once again.


 


I hope you find this article helpful. If you have any feedback please do not hesitate to provide it in the comment section below.


 


Ahmed S. Mazrouh