Month: August 2024
Microsoft Defender for Endpoint’s Safe Deployment Practices
For customers it is key to understand that software vendors use safe deployment practices that help them build resilient processes that maintain productivity. This blog addresses Microsoft Defender for Endpoint’s architectural design and its approach to delivering security updates, which is grounded in Safe Deployment Practices (SDP).
Microsoft Defender for Endpoint helps protect organizations against sophisticated adversaries while optimizing for resiliency, performance, and compatibility, following best practices for managing security tools in Windows.
Security tools running on Windows can balance security and reliability through careful product design, as described in this post by David Weston. Security vendors can use optimized sensors which operate within kernel mode for data collection and enforcement, limiting the risk of reliability issues. The remainder of the security solution, including managing updates, loading content, and user interaction, can occur isolated within user mode, where any reliability issues are less impactful.
Image 1: Defender for Endpoint integration into Windows architecture
In the remainder of this blog post, we outline Microsoft’s use of safe deployment practices for Defender for Endpoint, our 1st party endpoint protection solution.
Defender for Endpoint applies safe deployment practices to two distinct update mechanisms:
Software and driver updates that are updated monthly (and potentially can update kernel-mode components).
Security intelligence and detection logic updates that may be updated multiple times per day and apply only to user-mode components.
This blog outlines in-depth how Defender for Endpoint approaches SDP and what customers can do to manage their own roll-out process for an additional layer of control.
1. Software and driver updates
Microsoft Defender for Endpoint releases monthly software and driver updates that add new functionality, improve existing features, and resolve bugs. Defender for Endpoint’s kernel drivers capture system-wide signals like process execution, file creation, and network activity. These drivers are updated through Update, over a gradual and staged deployment process,. The deployment evaluation monitors key metrics like reliability, performance, battery, application compatibility, and more across hardware and software configurations.
Image 2: Process for rolling out software and driver updates for Defender for Endpoint
Microsoft safeguards
All code and content changes go through engineering release gates along with extensive validations and stability testing. After the certification and validation process, Microsoft ships the updates through multiple groups of devices known as stabilization rings. The first stabilization rings target Microsoft’s hundreds of thousands of employees and millions of internal devices. This helps ensure we discover and address issues first, before customers.
Within each ring, we closely monitor quality signals such as product behavior and performance, false positives, as well as functional and reliability issues, before proceeding to roll out the update to a broader set of devices. to see how each update may interact with their devices and provide feedback to Microsoft before it is released.
Once internal testing is successfully completed, Microsoft then releases the updates externally in a staggered manner to ensure stability. During this time, Microsoft continuously monitors the rollout. That way we can quickly respond and remotely resolve any issues by reverting or reissuing update packages.
Customer controls
In addition to Microsoft’s safe deployment practices, organizations can also manage monthly updates with their own safe deployment policies through various controls:
Control the delivery of agent updates to their devices by their device groups and the timing of updates.
Apply patch management software and practices for security component updates that can also arrive in the form of monthly Latest Cumulative Updates (LCUs)
Use manual or automated rollback options to revert or reset components to a last known good state.
2. Security intelligence and detection logic updates
In addition to monthly code updates, Microsoft releases security intelligence updates which are installed on devices to supplement the real-time local and cloud-based machine learning models, behavior analysis, and heuristics that enable Defender for Endpoint to neutralize the latest known cyberthreats.
Given the high frequency at which these updates need to be delivered to protect customers, it’s not possible to deploy these through the same deployment process. Therefore, Microsoft Defender for Endpoint does not include kernel changes in intelligence updates. Instead, daily updates are only delivered to components that run in the user mode of the operating system. This approach helps mitigate the risk of these more frequent updates from impacting
Microsoft safeguards
Similar to the process for software and driver updates, Microsoft ships security intelligence updates after extensive testing and rolls them out starting with internal devices, early access customers, and then releases them externally in a controlled, manner. We continually monitor telemetry and can mitigate issues through the cloud in minutes.
Customer controls
Customers can also manage security intelligence updates with their own safe deployment policies through various controls:
Stage updates through corporate networks or software management solutions.
Apply updates at a lower frequency for critical systems. Daily releases can be applied at a lower frequency for certain device groups, including servers critical to running your infrastructure.
Use rollback controls. As a last resort, it’s possible to revert or reset components to a last known good state using rollback controls.
Resources
To start a free, 90-day trial of Defender for Endpoint, sign up here.
To learn more about how you can control rollout of Defender for Endpoint’s updates and join early access groups, check out these resources for Windows, Mac, and Linux.
Microsoft Tech Community – Latest Blogs –Read More
Can I turn on the plot browser in a Matlab app?
I’m using the matlab app designer to create some plots and would like to add the plot browser so that I can hide/show certain data in the app. I am using 2024a and a cursory search on Google has turned up nothing.I’m using the matlab app designer to create some plots and would like to add the plot browser so that I can hide/show certain data in the app. I am using 2024a and a cursory search on Google has turned up nothing. I’m using the matlab app designer to create some plots and would like to add the plot browser so that I can hide/show certain data in the app. I am using 2024a and a cursory search on Google has turned up nothing. plotbrowser MATLAB Answers — New Questions
GPU Array Max Dimensions/Size (i.e., int32 of ~2e9) Not Same as Other CUDA-Enabled Languages (i.e., Python 3.9 – Tensorflow 2.11)
I would like to create Matlab GPU arrays that have a number of elements exceeding the max value of int32 (~2e9). In Matlab, when I try to do this, I get a "Max variable size exceeded" error. Other answers on this forum point to this limitation in GPU array size being caused by limitations in the CUDA API. However, I don’t believe this is accurate. Other languages, like Python 3.9 using theTensorflow 2.11 library for example, that are built on CUDA/CUBLAS allow for arrays that have a number of elements that exceed the MATLAB limitation.
Why is this the case, and why does Matlab seem limited where other languages are not?
The version of Matlab that I am using is 2024a, tested on both Win11 and Ubuntu 20.04LTS with a Nvidia Ada A6000 GPU (VRAM 48GB).
Matlab Code to reproduce:
g = gpuDevice();
arr = ones(1e4, 1e4, 60, ‘single’);
gpu_arr = gpuArray(arr);
Matlab ERROR:
Error using gpuArray
Maximum variable size allowed on the device is exceeded.
Python Code to reproduce:
import tensorflow as tf
arr = tf.ones([10000, 10000, 60])I would like to create Matlab GPU arrays that have a number of elements exceeding the max value of int32 (~2e9). In Matlab, when I try to do this, I get a "Max variable size exceeded" error. Other answers on this forum point to this limitation in GPU array size being caused by limitations in the CUDA API. However, I don’t believe this is accurate. Other languages, like Python 3.9 using theTensorflow 2.11 library for example, that are built on CUDA/CUBLAS allow for arrays that have a number of elements that exceed the MATLAB limitation.
Why is this the case, and why does Matlab seem limited where other languages are not?
The version of Matlab that I am using is 2024a, tested on both Win11 and Ubuntu 20.04LTS with a Nvidia Ada A6000 GPU (VRAM 48GB).
Matlab Code to reproduce:
g = gpuDevice();
arr = ones(1e4, 1e4, 60, ‘single’);
gpu_arr = gpuArray(arr);
Matlab ERROR:
Error using gpuArray
Maximum variable size allowed on the device is exceeded.
Python Code to reproduce:
import tensorflow as tf
arr = tf.ones([10000, 10000, 60]) I would like to create Matlab GPU arrays that have a number of elements exceeding the max value of int32 (~2e9). In Matlab, when I try to do this, I get a "Max variable size exceeded" error. Other answers on this forum point to this limitation in GPU array size being caused by limitations in the CUDA API. However, I don’t believe this is accurate. Other languages, like Python 3.9 using theTensorflow 2.11 library for example, that are built on CUDA/CUBLAS allow for arrays that have a number of elements that exceed the MATLAB limitation.
Why is this the case, and why does Matlab seem limited where other languages are not?
The version of Matlab that I am using is 2024a, tested on both Win11 and Ubuntu 20.04LTS with a Nvidia Ada A6000 GPU (VRAM 48GB).
Matlab Code to reproduce:
g = gpuDevice();
arr = ones(1e4, 1e4, 60, ‘single’);
gpu_arr = gpuArray(arr);
Matlab ERROR:
Error using gpuArray
Maximum variable size allowed on the device is exceeded.
Python Code to reproduce:
import tensorflow as tf
arr = tf.ones([10000, 10000, 60]) gpu, parallel computing toolbox, gpuarray, memory, vram, cuda, python MATLAB Answers — New Questions
save animation in subplot
I’m using
while
drawnow;hold off
end
to create an animation. But this animation is just the 6th position as in subplot(2,3,6) (or through next tile repeatedly). To save this animation to the computer while not keeping the other subplots 1~5, what to do?I’m using
while
drawnow;hold off
end
to create an animation. But this animation is just the 6th position as in subplot(2,3,6) (or through next tile repeatedly). To save this animation to the computer while not keeping the other subplots 1~5, what to do? I’m using
while
drawnow;hold off
end
to create an animation. But this animation is just the 6th position as in subplot(2,3,6) (or through next tile repeatedly). To save this animation to the computer while not keeping the other subplots 1~5, what to do? drawnow, movie MATLAB Answers — New Questions
Partner Roundtables at Power Platform Conference
Attending the 2024 Power Platform Community Conference? Join us for Partner Roundtables for an opportunity to discuss key topics of interest for Partners for FY25 growth acceleration and to provide feedback to Microsoft on partner programs and resources. These events will be held on Wednesday, September 18th and Thursday, September 19th in person at the Conference.
Note: you must be registered for the Conference to attend these sessions.
Sign up today: https://forms.office.com/r/dquKd5rNX7
Attending the 2024 Power Platform Community Conference? Join us for Partner Roundtables for an opportunity to discuss key topics of interest for Partners for FY25 growth acceleration and to provide feedback to Microsoft on partner programs and resources. These events will be held on Wednesday, September 18th and Thursday, September 19th in person at the Conference.
Note: you must be registered for the Conference to attend these sessions.
Sign up today: https://forms.office.com/r/dquKd5rNX7
Read More
Need to know if CM site server account supports UTF-8, longer byte limits, and more
We are using MECM/SCCM with two domains – my primary domain I run, and a customer domain that has a management point VM set up in it. That Management Point is connecting back to my main domain via a service account.
The admins of the customer domain are moving to a new HR product, Workday, and wish to know the following as part of their migration.
Can your service, CM, consume display name as UTF8?Can CM consume display name with a 1,024 byte limit?Could CM consume a custom attribute for name data (instead of display name)?Can CM use SAML, OIDC (OpenID Connect), or Azure for authentication or provisioning?
I have examined the SCCM prerequisites and cannot find specific details on this. Is there any way I can find out the answers to this? I am assuming the answer is no for all of this – but in the interest of being thorough for the other domain’s admins, I want to at least ask and confirm.
We are using MECM/SCCM with two domains – my primary domain I run, and a customer domain that has a management point VM set up in it. That Management Point is connecting back to my main domain via a service account. The admins of the customer domain are moving to a new HR product, Workday, and wish to know the following as part of their migration. Can your service, CM, consume display name as UTF8?Can CM consume display name with a 1,024 byte limit?Could CM consume a custom attribute for name data (instead of display name)?Can CM use SAML, OIDC (OpenID Connect), or Azure for authentication or provisioning?I have examined the SCCM prerequisites and cannot find specific details on this. Is there any way I can find out the answers to this? I am assuming the answer is no for all of this – but in the interest of being thorough for the other domain’s admins, I want to at least ask and confirm. Read More
Outlook on Mac doesn’t open or sync
I have Outlook on my MacBook Air. There are thousands of messages (and the mailbox/account is not full). However, it will not open. When I open Outlook in my browser, it doesn’t sync. It says I have zero messages. What is happening and how do I fix these? I have reset my account to unblock it.
I have Outlook on my MacBook Air. There are thousands of messages (and the mailbox/account is not full). However, it will not open. When I open Outlook in my browser, it doesn’t sync. It says I have zero messages. What is happening and how do I fix these? I have reset my account to unblock it. Read More
Extending Microsoft Copilot for Security Capabilities with Azure Function Apps
Azure Function Apps Function Apps) offer a convenient way to execute functions in a server-less environment. They allow users to write functions in C#, Java, JavaScript, PowerShell, Python and Typescript which can then be called using several trigger options. One of the most common triggers is the HTTP trigger allowing functions to be called like a REST API.
Microsoft Copilot for Security (Copilot) is a large language model (LLM) based generative Artificial Intelligence (AI) system for cybersecurity use cases. Copilot is not a monolithic system but is an ecosystem running on a platform that allows data requests to be fulfilled from multiple sources using a unique plugin mechanism. The plugin mechanism gives Copilot the capability to pull data for any external data source that supports a REST like API, thus allowing Copilot to call Function Apps that use the HTTP trigger.
By using Function Apps as Copilot for Security plugins, you can have Copilot indirectly execute custom code. In the code, custom use cases which are not provided by current set of Microsoft and non-Microsoft plugins or Logic Apps, can be implemented. Some examples where Function Apps can be used are:
Calling external APIs which use non-standard authentication: If an external API does not use oAuth2 or any of the supported authentication types in Copilot, or require a message hash to generated with each API request, the only way to make the API request is by executing custom code from a Function App.
Data Massaging: Several API calls return lot of data and data massaging is required to remove irrelevant fields and condense the data being sent to Copilot. In this case, Function Apps can act as the proxy that makes the API call, receives the response data, removes irrelevant fields and then passes the cleaned up data to Copilot.
Getting Data from in-house tools: Several organizations have custom security and operations tools which do not have a REST API, making a Copilot plugin not possible. In these cases, Function Apps can act as the proxy that takes the required input from Copilot, run the custom tools and send the output back to Copilot.
This article assumes proficiency with the Python programming language and familiarity with Function Apps and the Visual Studio Code (VS Code) development environment.
Integrating Azure Function Apps with VS Code
The Azure Functions core tools allow development of Functions App locally while the Azure Function extension for VS Code lets you easily deploy Function Apps from VS Code itself. A good description of the setup required to build and deploy Python based Functions apps in VS Code is given here. We highly recommend to setup your VS Code for Azure Function App development, before proceeding further.
Once setup of core tools and Azure functions has been completed successfully, authenticate to your Azure account after which an Azure icon is visible in VS Code as highlighted in the circle. Clicking on the icon populates the list of Azure resources in the navigation pane.
Sample Use Case
Prioritizing remediation for the latest CVEs is an overwhelming task and it is common for security teams to prioritize remediation based on the exploitability of a CVE. It is important to know if a CVE is being actively exploited in the wild and if that particular CVE impacts your environment. Copilot calling Function Apps as a plug-in works well for this use case.
The Cybersecurity & Infrastructure Security Agency (CISA) maintains a catalog called the Known Exploited Vulnerabilities (KEV) which contains a list of vulnerabilities that have been exploited in the wild. Since the threat landscape is constantly evolving the KEV catalog is constantly being updated and several organizations use the KEV catalog as one of the sources of Common Vulnerabilities and Exposures (CVEs) that should be scanned in their environment.
The KEV catalog is available in CSV and JSON formats which can be downloaded from here. A sample cutout of the CSV file is shown below, notice the several fields available for each CVE:
Using Function Apps we will add capability in Copilot to query the CISA KEV catalog and extract the following information:
Total number of CVEs present.
Number of CVEs present for a Product.
Number of CVEs present for a Publisher.
List all CVEs for a Product.
The above is only a small subset of information that can be extracted from the KEV catalog and you can build upon the code to extract any additional information. Note that Copilot also has in-built Public Web and GPT skills that can extract some information from the KEV catalog, but extracting more specific information requires help of code which a Function App provides.
Python Code
When building a function app, it is good practice to test the code separately and we recommend encapsulating all the functions you need in a Python Class, which makes porting to a Function App much easier. The following class encapsulates all the functions we need to fulfill the 4 data points we need for our use case, inline comments provide more details on each function.
Filename: cisakey.py
import requests
import ast
import json
class cisakev:
”’
Input: N/A
Output: N/A
Details: Constructor, intended to be private function
”’
def __init__(self):
# Hard code URL to the CISA KEV
self._url = “https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json”
self._jsonDict = “” # Dictionary to store data from the CISA KEV catalog
self.__download__() # Download The file in the constructor
”’
Input: N/A
Output: N/A
Details: Downloads the latest CISA KEV and assign to an internal JSON dictionary
Called from constructor, intended as private function
”’
def __download__(self):
try:
response = requests.get(self._url)
response.raise_for_status() # Will raise an HTTPError if the HTTP request returned an unsuccessful status code
jsonStr = response.content.decode(“utf-8”)
# safe evaluation
jsonStr = jsonStr.replace(‘\/’,”)
self._jsonDict = ast.literal_eval(jsonStr) # Convert to dictionary from JSON string
except requests.RequestException as e:
raise SystemExit(f”Failed to make the request. Error: {e}”) # Will result in HTTP 500
”’
Input: CVE ID
Output: True or False depending if the CVE is present
Details: Does an exact match on the CVE after converting input to upper case
”’
def isCVEPresent(self, cve):
try:
cve = cve.upper()
for vuln in self._jsonDict[“vulnerabilities”]:
if(vuln[“cveID”] == cve): # Do an exact match
return self.getJSONOutput(True)
return self.getJSONOutput(False)
except Exception as e:
raise SystemExit(f”Failed to make the request. Error: {e}”) # Will result in HTTP 500
”’
Input: Vendor Name
Output: Count of the CVEs tagged with the Vendor
Details: Uses a ‘contains in’ match, where the given vendor name string is contained
inside the ‘vendorProject’ field
”’
def countCVEForVendor(self, vendor):
try:
vendor = vendor.upper()
count = 0
for vuln in self._jsonDict[“vulnerabilities”]:
if(vendor in vuln[“vendorProject”].upper()): # contains in match
count += 1
return self.getJSONOutput(count)
except Exception as e:
raise SystemExit(f”Failed to make the request. Error: {e}”) # Will result in HTTP 500
”’
Input: Product Name
Output: Count of the CVEs tagged with the Product
Details: Uses a ‘contains in’ match, where the given product string is contained
inside the ‘product’ field
”’
def countCVEForProduct(self, product):
try:
product = product.upper()
count = 0
for vuln in self._jsonDict[“vulnerabilities”]: # contains in match
if(product in vuln[“product”].upper()):
count += 1
return self.getJSONOutput(count)
except Exception as e:
raise SystemExit(f”Failed to make the request. Error: {e}”) # Will result in HTTP 500
”’
Input: Product Name
Output: list of the CVEs tagged with the Product, returned as List(Array)
Details: Uses a ‘contains in’ match, where the given product string is contained
inside the ‘product’ field
”’
def listCVEForProduct(self, product):
try:
product = product.upper()
cves = []
for vuln in self._jsonDict[“vulnerabilities”]:
if(product in vuln[“product”].upper()):
cves.append(vuln[“cveID”])
return self.getJSONOutput(cves)
except Exception as e:
raise SystemExit(f”Failed to make the request. Error: {e}”) # Will result in HTTP 500
”’
Input: Numeric or Array
Output: Converts the Input to a Json assigned to the variable ‘value’.
Example: If input is 1, Output will be {“value”:1}
Details: N/A
”’
def getJSONOutput(self, value):
sJson = ‘{“value”:’
sJson += json.dumps(value) + “}”
# Any exception will bubble up
return sJson
The constructor of this Class (__init__()) calls __download__() which downloads the JSON formatted KEV catalog and stores it in an internal dictionary variable (_jsonDict) which allows search and data extraction convenient. We use the JSON format since it is easier to handle JSON in Python code, but using the CSV is also ok.
_jsonDict is referenced by the individual functions that take the required input parameters and return the data after searching _jsonDict. Note that the final output is passed via getJSONOutput(), so that a formatted JSON response is returned. While this is not required, it adds consistency as the output format is like what one should expect from a REST API.
The following code is given in a separate file which is used to call the functions in the Class and simulates the Function App. This is good way to insure that correct data is being returned and for more complex functions, using a Pythonic Unit test framework like unittest is better.
Filename: consumer.py
from cisakev import cisakev
def main():
ck = cisakev()
print(“ck.isCVEPresent(‘CVE-2021-27102’)”,ck.isCVEPresent(“CVE-2021-27102”)) # True
print(“ck.countCVEForVendor(‘Linux’)”,ck.countCVEForVendor(“Linux”)) # 14
print(“ck.countCVEForProduct(‘Outlook’)”,ck.countCVEForProduct(“Outlook”)) # 1
print(“ck.listCVEForProduct(‘Android Kernel’)”,ck.listCVEForProduct(“Android Kernel”)) # “CVE-2019-2215”, “CVE-2020-0041”
if __name__ == ‘__main__’:
main()
The output of running consumer.py in VS Code is given below:
With all functions in the cisakev Class working we are ready to move and build the Function App.
Testing Azure Function Apps locally
We need to create a Function App project in VSCode. This can be done by bringing in the Command Palette (F1) and selecting ‘Azure Functions: Create New Project….’. or ‘Azure Functions: Create Function App in Azure …’. The latter will also create the necessary Azure App resource in the Azure subscription while with the former option the Azure App has to be created via the Azure console, which is the option we have selected for this article.
After choosing ‘Azure Functions: Create New Project….’, select the language as Python, model as ‘Model V2’ and among the many trigger options select the HTTP trigger (allowing our code to run on a Copilot HTTP GET request):
Name the function ‘http_trigger_cisakev’:
Select ‘Anonymous’ for level control. Anonymous access allows the request to be received from any address, this is a good option for testing. Before we host the function in Azure, we will change it to ‘Function’ via the code, requiring all requests to contain the API Key:
Once these steps are complete an Azure Function basic project structure is created, as shown below:
function_app.py is where the main code and entry functions resides, and a basic templated code is auto-generated for us:
Note that you may have to install the ‘azure.functions’ module (using: pip install azure.functions) before running the code.
Next, copy the cisakev.py file previously built in the standalone project to this project. The project structure should look like this:
In our API call, we will add two query parameters ‘op’ and ‘data’. The value of ‘op’ will determine which of our 4 functions is called, and the ‘data’ is the parameter to that function. Hence a sample URL to run the Azure function will be:
https://<URL>?op='<code>’&data='<data>’
We will use Python’s match-case syntax to branch over the op value and call the respective function. The updated code for function_app.py is given, note that we instantiate the cisakev class in the same way we did in the consumer.py code:
Filename: function_app.py
import azure.functions as func
import logging
from cisakev import cisakev
app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)
# URL /?op='<code>’&data='<data>’
@app.route(route=”get_cisa_kev”)
def http_trigger_cisakev(req: func.HttpRequest) -> func.HttpResponse:
logging.info(‘Python HTTP trigger function processed a request.’)
op = req.params.get(‘op’)
data = req.params.get(‘data’)
# Instantiate the cisakev object
ck = cisakev()
response = “”
match op: # Call the function based on the op and pass in data
case “cvePresent”:
# code for pattern 1
response = ck.isCVEPresent(data)
case “countCVEForVendor”:
# code for pattern 2
response = ck.countCVEForVendor(data)
case “countCVEForProduct”:
# code for pattern N
response = ck.countCVEForProduct(data)
case “listCVEForProduct”:
# default code block
response = ck.listCVEForProduct(data)
case _:
response = “Input data is missing”
return func.HttpResponse(response,status_code=200)
With Azure core tools you can run the function app locally (press F5) and for HTTP triggers a local port is made accessible. Note that if code needs storage the ‘Azurite’ emulator needs to be running as explained here. Once the Azure function is loaded and ready, the local URL will made available in the VS Code Terminal pane:
Using a REST API client (Boomerang, Postman etc.) we can make calls to the local Azure App and check if all required options are working correctly. The following call checks if a CVE is present in the latest KEV catalog with the JSON response shown in the right.
The following call gets the list of CVEs for a specific product:
With the Function app working well locally, it’s time to deploy to Azure.
Deploying the Azure Function App to Azure
We will need a Function App resource that will host and execute the code. The resource can be created from the Azure console or from VS Code using the ‘Azure Functions: Create Function App in Azure …’ command as detailed here. For our example, we created the Function App ‘FA-CISA-KEY’ in Azure and can see it in our resources (resource name: FA-CISA-APP):
Once the resource is available, use command template (F1) in VS Code and select ‘Azure Functions: Deploy to Function App…’. However, before proceeding further let’s discuss an important file that contains list of modules our code needs.
requirements.txt
In our cisakev class we are using the requests module which is not part of standard Python distribution. While we can use pip to install any PyPI package locally we cannot execute pip in Function Apps, so all non-standard modules that are required must be defined in the requirements.txt file, which exists in the main folder of our projects. Make sure not to remove any existing modules present in the requirements.txt file, and after requests is added the contents of this file are:
Filename: requirements.txt
# DO NOT include azure-functions-worker in this file
# The Python Worker is managed by Azure Functions platform
# Manually managing azure-functions-worker may cause unexpected issues
azure-functions
requests
With the requirements.txt updated, run ‘Azure Functions: Deploy to Function App…’ command which guides through the steps. Since the Function App is already hosted, you will get to select the function app resource in Azure where the newly developed Function App project must be deployed.
The deployment of the function app will erase any previous deployments, VS Code shows a warning as to that respect:
After verifying you are updating the right Function App, select ‘Deploy’ to deploy the Function App to Azure.
App/API Keys
In the code we tested locally, the authentication level was set to Anonymous which allows anyone to call the Function app, which is a really bad idea in a production environment. Hence, we will add some access control using App keys which are Function App’s equivalent to API keys.
Function App access can be set to Anonymous, Admin or Function level, while access keys can be Function, Host, Master and System. More details on the access and key types is given here. For our App we will set Function level access and use the default key.
The access level is set up in the code. In the function_app.py files change the existing Anonymous access from:
app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)
to:
app = func.FunctionApp(http_auth_level=func.AuthLevel.FUNCTION)
Deploy the app again with this change so that the Function App running in Azure will only allow access if the key is present.
The key is accessed in the Azure console via the App Keys link as shown below, and we will use the default key:
Testing the Function App
It’s time to test our Function app via a REST client as we did before. The URL of the hosted Function App is visible in the Overview pane in Azure console:
With this URL let’s head to Boomerang and make a call to see if a CVE is present. We only change the URL and make the call, but we get a HTTP 401 (Access Denied). Can you guess why?
Since we have added access control in the code we need to specify the access key in the headers. The header string for Function App access key is ‘x-functions-key’ and the value is copy/pasted from the Azure Console as shown below:
With the correct value for ‘x-functions-key’ specified, this call is successful. Let’s make another call to fetch the list of CVEs and confirm it returns the correct data.
Now it’s time to have Copilot make calls to our Function app via an API plugin.
Copilot API Plugin
Copilot’s API plugins needs two JSON or YAML files, and a beginner’s walkthrough for building API plugins is available here. The main plugin YAML file is given below:
Filename: API_Plugin_AzureFunction_CISA_KEV.yaml
Descriptor:
Name: Fetch details from the CISA Known Exploited Vulnerabilities (KEV) list
DisplayName: Fetch details from the CISA Known Exploited Vulnerabilities (KEV) list
Description: The skills in this plugin will get different information on CVEs present from the latest CISA KEV list
DescriptionForModel: The skills in this plugin will get information like CVE count by product or publisher as well as list of CVEs. This information is sourced from the latest CISA Fetch details from the CISA Known Exploited Vulnerabilities (KEV) list.
SupportedAuthTypes:
– ApiKey
Authorization:
Type: APIKey
Key: x-functions-key
Location: Header
AuthScheme: ”
SkillGroups:
– Format: API
Settings:
OpenApiSpecUrl: http://<URL>/API_Plugin_AzureFunction_CISA_KEV_OAPI.yaml
Note the ‘Key’ value given in the YAML side, this is inserted into the header by Copilot and should match exactly as the Function App expects it. The OpenAPI specification file for our plugin is given below:
Filename: API_Plugin_AzureFunction_CISA_KEV_OAPI.yaml
openapi: 3.0.0
info:
title: Fetch details from the CISA Known Exploited Vulnerabilities (KEV) list
description: The skills in this plugin will get different information on CVEs present from the latest CISA KEV list
version: “v1”
# This should point to the Azure Function URL
servers:
– url: https://fa-cisa-kev.azurewebsites.net/api/
paths:
/get_cisa_kev?op=cvePresent:
get:
operationId: cvePresent
description: Determines if a given CVE is present in the latest CISA KEV list
parameters:
– in: query
name: data
schema:
type: string
required: true
description: The CVE whose presence has to be determined.
responses:
“200”:
description: OK
content:
application/json:
/get_cisa_kev?op=countCVEForProduct:
get:
operationId: countCVEForProduct
description: Counts the number of CVEs based on the name of a product, in the latest CISA KEV list
parameters:
– in: query
name: data
schema:
type: string
required: true
description: The product name for whom the CVE count has to be determined
responses:
“200”:
description: OK
content:
application/json:
/get_cisa_kev?op=listCVEForProduct:
get:
operationId: listCVEForProduct
description: Lists all the CVEs based on the name of a product, in the latest CISA KEV list.
parameters:
– in: query
name: data
schema:
type: string
required: true
description: The product name for whom the CVE list has to be determined
responses:
“200”:
description: OK
content:
application/json:
/get_cisa_kev?op=countCVEForVendor:
get:
operationId: countCVEForVendor
description: Counts the number of CVEs based on the name of a vendor, in the latest CISA KEV list
parameters:
– in: query
name: data
schema:
type: string
required: true
description: The vendor name for whom the CVE count has to be determined
responses:
“200”:
description: OK
content:
application/json:
Each of the supported operations is in its own URL (matching to an individual skill) that is given as a fixed query parameter, but the data is taken as an Input. Copilot will insert the data from the user’s prompt, and Copilot’s orchestrator will select the skill (and the plugin) based on the Description and DescriptionForModel defined in both the YAML files.
After uploading the OpenAPI specification file to an Internet accessible URL, we are ready to upload the plugin to Copilot.
In the Copilot console, select the Plugin sources in command bar:
Select Add Plugin:
Select the main YAML file for the plugin and press ‘Add’:
You will receive a confirmation when the Plugin has been added:
After the plugin is added, you will be asked to enter an API key. Copy/Paste the API/App key from the Azure console as discussed earlier and press ‘Save’.
With the key entered ensure the custom plugins and this specific plugin are both enabled:
We are now ready to test the plugin. Let us first invoke one of the skills directly to confirm Copilot can communicate with our Function App. For directly invoking the skill, click on the ‘Prompts’:
And select “See all System capabilities”:
Scroll down till the “Fetch Details From…” plugin name is displayed, and within it all four skills will be visible.
Select ‘cvePresent’, and enter the same CVE we had been using in our previous tests, click the Submit icon:
Copilot will select the CISA KEV plugin and the skill, make a call to the Azure Function App and format the response JSON to natural language:
This confirms Copilot can talk to the Function app and we are ready to issue a prompt that leverages the CISA KEV plugin. Let’s start with checking the presence of another CVE:
Prompt: “Can you tell me if CVE-2020-12812 is present in the CISA KEV catalog?”
Prompt: “Show me the number of CVEs present in the CISA KEV catalog where the vendor is Linux”:
Prompt: “Show me the number of CVEs present in the CISA KEV catalog where the product is Outlook”:
Prompt: “Show me all the CVEs present in the CISA KEV catalog where the product is Android Kernel”:
After getting the CVE list we can query Defender or other sources to check if those CVEs exist in the environment. This highlights how Copilot can pull data from multiple tools and have custom plugins like the one we built, enrich the reasoning from those tools.
Prompt: “From Defender, how many of the above CVEs are present in my environment?”
Copilot confirms via data from Defender Vulnerability Management that none of the specific CVEs we queried from CISA KEV catalog exist in our environment.
In our Function App, for each request the CISA KEV catalog is downloaded. While this ensures we are looking at the latest CISA KEV catalog, if requests from Copilot are coming in frequently the same CISA KEV catalog file is downloaded multiple times. Even though serverless computing like Function App are meant to be stateless, there are ways the downloaded file can be persisted in storage or in memory (via Durable Functions) improving the efficiency of the Function App. However, this is outside the purview of this article and for more information please look in the previous links.
In this article, we have shown how to build a Function App and have Copilot use it as an API plugin. This gives Copilot the indirect capability to execute custom code and use it’s output to reason on, opening a wide range of possibilities and use cases.
Would be good to start by explaining why this cannot be achieved any other way i.e. in what circumstances is using Function Apps the best or the only way to achieve a certain use cases.
Microsoft Tech Community – Latest Blogs –Read More
How can I increase the number of decimal places displayed on app designer UITable?
I am working on an app that ultimately produces 4 separate tables, each containing 4 columns of data. For simplicity, I am only including a single example, as I would think the process should be identical for all 4 tables, aside from the name of each table. All of the tables currently only show 4 decimal places. I would like to show more than this. I tried putting the following code in my startup function:
function startupFcn(app)
clc
close all
app.UITable.ColumnFormat = {‘long’,’long’,’long’,’long’}; %4x ‘long’ – 1 for each column?
This does not seem to work, as all of the tables still only display 4 decimal places. Any help would much appreciated. Thank you.I am working on an app that ultimately produces 4 separate tables, each containing 4 columns of data. For simplicity, I am only including a single example, as I would think the process should be identical for all 4 tables, aside from the name of each table. All of the tables currently only show 4 decimal places. I would like to show more than this. I tried putting the following code in my startup function:
function startupFcn(app)
clc
close all
app.UITable.ColumnFormat = {‘long’,’long’,’long’,’long’}; %4x ‘long’ – 1 for each column?
This does not seem to work, as all of the tables still only display 4 decimal places. Any help would much appreciated. Thank you. I am working on an app that ultimately produces 4 separate tables, each containing 4 columns of data. For simplicity, I am only including a single example, as I would think the process should be identical for all 4 tables, aside from the name of each table. All of the tables currently only show 4 decimal places. I would like to show more than this. I tried putting the following code in my startup function:
function startupFcn(app)
clc
close all
app.UITable.ColumnFormat = {‘long’,’long’,’long’,’long’}; %4x ‘long’ – 1 for each column?
This does not seem to work, as all of the tables still only display 4 decimal places. Any help would much appreciated. Thank you. appdesigner, uitable MATLAB Answers — New Questions
Plotting multiple datasets on one plot
I have a set of data for three replicate simulations: run0-run2, these consist of .dat files at a set time interval (here, every 100ns until final time 500ns).
I would like to plot these all on one plot but with a different colour gradient from darker to lighter e.g.
Run0 with a blue gradient dark to light as time increases.
Run1 with a green gradient dark to light as time increases.
Run2 with a red gradient dark to light as time increases.
I created the MATLAB script below but during testing, only the red plots would show up.
Combining into one for loop doesn’t work as I tried that already.
Any help would be greatly apreciated.
Code below and attached.
r0_f100=readmatrix (‘run0_test_fluct-100ns.dat’);
r0_f200=readmatrix (‘run0_test_fluct-200ns.dat’);
r0_f300=readmatrix (‘run0_test_fluct-300ns.dat’);
r0_f400=readmatrix (‘run0_test_fluct-400ns.dat’);
r0_f500=readmatrix (‘run0_test_fluct-500ns.dat’);
x_0=r0_f100(:,1);
y_0=[r0_f100(:,2),r0_f200(:,2),r0_f300(:,2),r0_f400(:,2),r0_f500(:,2)];
r1_f100=readmatrix (‘run1_test_fluct-100ns.dat’);
r1_f200=readmatrix (‘run1_test_fluct-200ns.dat’);
r1_f300=readmatrix (‘run1_test_fluct-300ns.dat’);
r1_f400=readmatrix (‘run1_test_fluct-400ns.dat’);
r1_f500=readmatrix (‘run1_test_fluct-500ns.dat’);
x_1=r1_f100(:,1);
y_1=[r1_f100(:,2),r1_f200(:,2),r1_f300(:,2),r1_f400(:,2),r1_f500(:,2)];
r2_f100=readmatrix (‘run2_test_fluct-100ns.dat’);
r2_f200=readmatrix (‘run2_test_fluct-200ns.dat’);
r2_f300=readmatrix (‘run2_test_fluct-300ns.dat’);
r2_f400=readmatrix (‘run2_test_fluct-400ns.dat’);
r2_f500=readmatrix (‘run2_test_fluct-500ns.dat’);
x_2=r2_f100(:,1);
y_2=[r2_f100(:,2),r2_f200(:,2),r2_f300(:,2),r2_f400(:,2),r2_f500(:,2)];
num_plots = 5;
colors = linspace(0.5, 1, num_plots)’;
figure
hold on
for i=1:num_plots
plot(x_0, y_0(:,i), ‘color’, [0 0 colors(i)]);
end
for i=1:num_plots
plot(x_1, y_1(:,i), ‘color’, [0 colors(i) 0]);
end
for i=1:num_plots
plot(x_2, y_2(:,i), ‘color’, [colors(i) 0 0]);
end
xlabel (‘Residue No.’); ylabel (‘RMSF / Å’);
ax = gca;
fig=gcf;
fig.Position(3:4)=[800,600];
fig.Color=[0.95 0.95 0.95];
ax.Color=[0.8 0.8 0.8];
hold off
%exportgraphics(fig,’test_RMSF.jpg’,’Resolution’,300);I have a set of data for three replicate simulations: run0-run2, these consist of .dat files at a set time interval (here, every 100ns until final time 500ns).
I would like to plot these all on one plot but with a different colour gradient from darker to lighter e.g.
Run0 with a blue gradient dark to light as time increases.
Run1 with a green gradient dark to light as time increases.
Run2 with a red gradient dark to light as time increases.
I created the MATLAB script below but during testing, only the red plots would show up.
Combining into one for loop doesn’t work as I tried that already.
Any help would be greatly apreciated.
Code below and attached.
r0_f100=readmatrix (‘run0_test_fluct-100ns.dat’);
r0_f200=readmatrix (‘run0_test_fluct-200ns.dat’);
r0_f300=readmatrix (‘run0_test_fluct-300ns.dat’);
r0_f400=readmatrix (‘run0_test_fluct-400ns.dat’);
r0_f500=readmatrix (‘run0_test_fluct-500ns.dat’);
x_0=r0_f100(:,1);
y_0=[r0_f100(:,2),r0_f200(:,2),r0_f300(:,2),r0_f400(:,2),r0_f500(:,2)];
r1_f100=readmatrix (‘run1_test_fluct-100ns.dat’);
r1_f200=readmatrix (‘run1_test_fluct-200ns.dat’);
r1_f300=readmatrix (‘run1_test_fluct-300ns.dat’);
r1_f400=readmatrix (‘run1_test_fluct-400ns.dat’);
r1_f500=readmatrix (‘run1_test_fluct-500ns.dat’);
x_1=r1_f100(:,1);
y_1=[r1_f100(:,2),r1_f200(:,2),r1_f300(:,2),r1_f400(:,2),r1_f500(:,2)];
r2_f100=readmatrix (‘run2_test_fluct-100ns.dat’);
r2_f200=readmatrix (‘run2_test_fluct-200ns.dat’);
r2_f300=readmatrix (‘run2_test_fluct-300ns.dat’);
r2_f400=readmatrix (‘run2_test_fluct-400ns.dat’);
r2_f500=readmatrix (‘run2_test_fluct-500ns.dat’);
x_2=r2_f100(:,1);
y_2=[r2_f100(:,2),r2_f200(:,2),r2_f300(:,2),r2_f400(:,2),r2_f500(:,2)];
num_plots = 5;
colors = linspace(0.5, 1, num_plots)’;
figure
hold on
for i=1:num_plots
plot(x_0, y_0(:,i), ‘color’, [0 0 colors(i)]);
end
for i=1:num_plots
plot(x_1, y_1(:,i), ‘color’, [0 colors(i) 0]);
end
for i=1:num_plots
plot(x_2, y_2(:,i), ‘color’, [colors(i) 0 0]);
end
xlabel (‘Residue No.’); ylabel (‘RMSF / Å’);
ax = gca;
fig=gcf;
fig.Position(3:4)=[800,600];
fig.Color=[0.95 0.95 0.95];
ax.Color=[0.8 0.8 0.8];
hold off
%exportgraphics(fig,’test_RMSF.jpg’,’Resolution’,300); I have a set of data for three replicate simulations: run0-run2, these consist of .dat files at a set time interval (here, every 100ns until final time 500ns).
I would like to plot these all on one plot but with a different colour gradient from darker to lighter e.g.
Run0 with a blue gradient dark to light as time increases.
Run1 with a green gradient dark to light as time increases.
Run2 with a red gradient dark to light as time increases.
I created the MATLAB script below but during testing, only the red plots would show up.
Combining into one for loop doesn’t work as I tried that already.
Any help would be greatly apreciated.
Code below and attached.
r0_f100=readmatrix (‘run0_test_fluct-100ns.dat’);
r0_f200=readmatrix (‘run0_test_fluct-200ns.dat’);
r0_f300=readmatrix (‘run0_test_fluct-300ns.dat’);
r0_f400=readmatrix (‘run0_test_fluct-400ns.dat’);
r0_f500=readmatrix (‘run0_test_fluct-500ns.dat’);
x_0=r0_f100(:,1);
y_0=[r0_f100(:,2),r0_f200(:,2),r0_f300(:,2),r0_f400(:,2),r0_f500(:,2)];
r1_f100=readmatrix (‘run1_test_fluct-100ns.dat’);
r1_f200=readmatrix (‘run1_test_fluct-200ns.dat’);
r1_f300=readmatrix (‘run1_test_fluct-300ns.dat’);
r1_f400=readmatrix (‘run1_test_fluct-400ns.dat’);
r1_f500=readmatrix (‘run1_test_fluct-500ns.dat’);
x_1=r1_f100(:,1);
y_1=[r1_f100(:,2),r1_f200(:,2),r1_f300(:,2),r1_f400(:,2),r1_f500(:,2)];
r2_f100=readmatrix (‘run2_test_fluct-100ns.dat’);
r2_f200=readmatrix (‘run2_test_fluct-200ns.dat’);
r2_f300=readmatrix (‘run2_test_fluct-300ns.dat’);
r2_f400=readmatrix (‘run2_test_fluct-400ns.dat’);
r2_f500=readmatrix (‘run2_test_fluct-500ns.dat’);
x_2=r2_f100(:,1);
y_2=[r2_f100(:,2),r2_f200(:,2),r2_f300(:,2),r2_f400(:,2),r2_f500(:,2)];
num_plots = 5;
colors = linspace(0.5, 1, num_plots)’;
figure
hold on
for i=1:num_plots
plot(x_0, y_0(:,i), ‘color’, [0 0 colors(i)]);
end
for i=1:num_plots
plot(x_1, y_1(:,i), ‘color’, [0 colors(i) 0]);
end
for i=1:num_plots
plot(x_2, y_2(:,i), ‘color’, [colors(i) 0 0]);
end
xlabel (‘Residue No.’); ylabel (‘RMSF / Å’);
ax = gca;
fig=gcf;
fig.Position(3:4)=[800,600];
fig.Color=[0.95 0.95 0.95];
ax.Color=[0.8 0.8 0.8];
hold off
%exportgraphics(fig,’test_RMSF.jpg’,’Resolution’,300); multiple datasets, plotting MATLAB Answers — New Questions
Windows Crashes When Video Starts
Hello,
When I open certain webpages but mostly on this domain:
https://www.tsn.ca/nhl/toronto-maple-leafs-brad-treliving-ready-to-go-into-2024-25-season-with-core-four-new-coach-1.2162463
the video causes Windows 11 to crash. The screen goes blank and the HDR appears right top corner then it either recovers or about 25% of the time crashes, I am not sure why the different actions though.
If it recovers I pause the video as that is not what I am there to see and all is well. If it crashed I can go into the same URL and it won’t crash a 2nd time but give the black screen, HDR then the page comes up and I pause the video.
I have a dump from the last crash that I opened this specific URL but I don’t know what to do with that.
Thanks
Hello, When I open certain webpages but mostly on this domain:https://www.tsn.ca/nhl/toronto-maple-leafs-brad-treliving-ready-to-go-into-2024-25-season-with-core-four-new-coach-1.2162463the video causes Windows 11 to crash. The screen goes blank and the HDR appears right top corner then it either recovers or about 25% of the time crashes, I am not sure why the different actions though. If it recovers I pause the video as that is not what I am there to see and all is well. If it crashed I can go into the same URL and it won’t crash a 2nd time but give the black screen, HDR then the page comes up and I pause the video. I have a dump from the last crash that I opened this specific URL but I don’t know what to do with that. Thanks Read More
Manipulating Spacing In A String VBA
Hello,
I have some code that I managed to put together in an excel template that automatically generates an email in outlook.
Question 1: I have found ways to create different types of breaks and font adjustments using “<p>”, “<u>” etc. and that is working fine, however, there is a portion of my email that i need to be able to start manually writing in point form (the 3 spots with the “-” in the email body under each heading “final inspection, coating inspection, preblast inspection etc.) everything looks good, however when I am finished writing the first point in the email and i want to add another “-” on the next line underneath to add more point under each section, I hit enter to space down and it automatically skips two lines. I have played around with positioning of <p> and </P> as well as the <br> break but i cannot find a solution. as far as formatting goes that seems to be the only real issue i am having with this.
eg. i want to be able to do something like this
Pre-Blast Inspection:
-was good
-found to be adhered well.
-more info ….
Question 2: there seems to be a maximum number of & _ breaks that i can add in this code and there are 2 additional lines that i was hoping to add. is there a workaround for that so that i can add more info?
The code is as follows:
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject(“Outlook.Application”)
Set OutMail = OutApp.CreateItem(0)
strbody = “<BODY style = font-size:8pt; font-family:Bahnscrift>” & _
“<b><u><font size=2>” & Sheets(“Email”).Cells(12, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(12, 2).Text & “</u></font>” & _
“<p><b>” & Sheets(“Email”).Cells(14, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(14, 2).Text & _
“<br><b>” & Sheets(“Email”).Cells(15, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(15, 2).Text & _
“<br><b>” & Sheets(“Email”).Cells(16, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(16, 2).Text & _
“<br><b>” & Sheets(“Email”).Cells(17, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(17, 2).Text & _
“<br><b>” & Sheets(“Email”).Cells(18, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(18, 2).Text & _
“<br><b>” & Sheets(“Email”).Cells(19, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(19, 2).Text & _
“<br><b>” & Sheets(“Email”).Cells(20, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(20, 2).Text & _
“<br><b>” & Sheets(“Email”).Cells(21, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(21, 2).Text & _
“<br><b>” & Sheets(“Email”).Cells(22, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(22, 2).Text & _
“<br><b>” & Sheets(“Email”).Cells(23, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(23, 2).Text & _
“<p><b>” & Sheets(“Email”).Cells(25, 1).Text & ” ” & “<i><font color=red><font size=3>” & Sheets(“Email”).Cells(25, 2).Text & “</i></font></font>” & _
“<p><b><u>” & Sheets(“Email”).Cells(27, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(27, 2).Text & “</u>” & _
“<br></b>” & Sheets(“Email”).Cells(28, 1).Text & _
“<p><b><u>” & Sheets(“Email”).Cells(29, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(29, 2).Text & “</u>” & _
“<br></b>” & Sheets(“Email”).Cells(30, 1).Text & _
“<p><b><u>” & Sheets(“Email”).Cells(31, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(31, 2).Text & “</u>” & _
“<br></b>” & Sheets(“Email”).Cells(32, 1).Text & _
“<p><b><i><font color=#EAA304>” & Sheets(“Email”).Cells(33, 2).Text & “</b></font>” & _
“<br><i>” & Sheets(“Email”).Cells(34, 2).Text & _
“<br><i>” & Sheets(“Email”).Cells(36, 2).Text & _
“<p><b><i><font color=#EAA304>” & Sheets(“Email”).Cells(38, 2).Text & “</b></font>” & _
“<br><i>” & Sheets(“Email”).Cells(39, 2).Text & ” ” & Sheets(“Email”).Cells(40, 2).Text & _
“<p>” & Sheets(“Email”).Cells(42, 2).Text
On Error Resume Next
With OutMail
.to = Sheets(“Email”).Cells(2, 2).Text
.CC = Sheets(“Email”).Cells(5, 2).Text
.BCC = Sheets(“Email”).Cells(8, 2).Text
.Subject = Sheets(“Email”).Cells(10, 2).Text
.Display
.HTMLBody = strbody & .HTMLBody
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
Thanks for your patience and help!
Hello, I have some code that I managed to put together in an excel template that automatically generates an email in outlook. Question 1: I have found ways to create different types of breaks and font adjustments using “<p>”, “<u>” etc. and that is working fine, however, there is a portion of my email that i need to be able to start manually writing in point form (the 3 spots with the “-” in the email body under each heading “final inspection, coating inspection, preblast inspection etc.) everything looks good, however when I am finished writing the first point in the email and i want to add another “-” on the next line underneath to add more point under each section, I hit enter to space down and it automatically skips two lines. I have played around with positioning of <p> and </P> as well as the <br> break but i cannot find a solution. as far as formatting goes that seems to be the only real issue i am having with this. eg. i want to be able to do something like thisPre-Blast Inspection:-was good-found to be adhered well.-more info …. Question 2: there seems to be a maximum number of & _ breaks that i can add in this code and there are 2 additional lines that i was hoping to add. is there a workaround for that so that i can add more info? The code is as follows: Dim OutApp As ObjectDim OutMail As ObjectDim strbody As StringSet OutApp = CreateObject(“Outlook.Application”)Set OutMail = OutApp.CreateItem(0)strbody = “<BODY style = font-size:8pt; font-family:Bahnscrift>” & _”<b><u><font size=2>” & Sheets(“Email”).Cells(12, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(12, 2).Text & “</u></font>” & _”<p><b>” & Sheets(“Email”).Cells(14, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(14, 2).Text & _”<br><b>” & Sheets(“Email”).Cells(15, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(15, 2).Text & _”<br><b>” & Sheets(“Email”).Cells(16, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(16, 2).Text & _”<br><b>” & Sheets(“Email”).Cells(17, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(17, 2).Text & _”<br><b>” & Sheets(“Email”).Cells(18, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(18, 2).Text & _”<br><b>” & Sheets(“Email”).Cells(19, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(19, 2).Text & _”<br><b>” & Sheets(“Email”).Cells(20, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(20, 2).Text & _”<br><b>” & Sheets(“Email”).Cells(21, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(21, 2).Text & _”<br><b>” & Sheets(“Email”).Cells(22, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(22, 2).Text & _”<br><b>” & Sheets(“Email”).Cells(23, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(23, 2).Text & _”<p><b>” & Sheets(“Email”).Cells(25, 1).Text & ” ” & “<i><font color=red><font size=3>” & Sheets(“Email”).Cells(25, 2).Text & “</i></font></font>” & _”<p><b><u>” & Sheets(“Email”).Cells(27, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(27, 2).Text & “</u>” & _”<br></b>” & Sheets(“Email”).Cells(28, 1).Text & _”<p><b><u>” & Sheets(“Email”).Cells(29, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(29, 2).Text & “</u>” & _”<br></b>” & Sheets(“Email”).Cells(30, 1).Text & _”<p><b><u>” & Sheets(“Email”).Cells(31, 1).Text & ” ” & “</b>” & Sheets(“Email”).Cells(31, 2).Text & “</u>” & _”<br></b>” & Sheets(“Email”).Cells(32, 1).Text & _”<p><b><i><font color=#EAA304>” & Sheets(“Email”).Cells(33, 2).Text & “</b></font>” & _”<br><i>” & Sheets(“Email”).Cells(34, 2).Text & _”<br><i>” & Sheets(“Email”).Cells(36, 2).Text & _”<p><b><i><font color=#EAA304>” & Sheets(“Email”).Cells(38, 2).Text & “</b></font>” & _”<br><i>” & Sheets(“Email”).Cells(39, 2).Text & ” ” & Sheets(“Email”).Cells(40, 2).Text & _”<p>” & Sheets(“Email”).Cells(42, 2).TextOn Error Resume NextWith OutMail.to = Sheets(“Email”).Cells(2, 2).Text.CC = Sheets(“Email”).Cells(5, 2).Text.BCC = Sheets(“Email”).Cells(8, 2).Text.Subject = Sheets(“Email”).Cells(10, 2).Text.Display.HTMLBody = strbody & .HTMLBodyEnd WithOn Error GoTo 0Set OutMail = NothingSet OutApp = Nothing Thanks for your patience and help! Read More
Change a hours:minutes to a decimal or general number
Hello,
I am trying to find a way to convert hours that look like this (36:50) which is 36 hours and 30 minutes into a general number or decimal such as 36.5.
Any help would be greatly appreciated.
Hello,I am trying to find a way to convert hours that look like this (36:50) which is 36 hours and 30 minutes into a general number or decimal such as 36.5.Any help would be greatly appreciated. Read More
Application Segmentation
Hello everyone,
I recently joined the company and have been tasked with segmenting the applications. Currently, all apps on the company portal are available to everyone, including developed and financial apps.
I considered organizing the apps by department, but the complex organizational structure makes this difficult. I then thought about creating generic groups like basic users, advanced users, developers, and software engineers, but with so many unique job titles, even these groups don’t seem to fit well.
Any suggestions, i have been think about this since last one week, but i don’t have any better solutions.
Thank you.
Hello everyone,I recently joined the company and have been tasked with segmenting the applications. Currently, all apps on the company portal are available to everyone, including developed and financial apps. I considered organizing the apps by department, but the complex organizational structure makes this difficult. I then thought about creating generic groups like basic users, advanced users, developers, and software engineers, but with so many unique job titles, even these groups don’t seem to fit well. Any suggestions, i have been think about this since last one week, but i don’t have any better solutions. Thank you. Read More
Flip
I am unable to add Flip as a channel. I absolutely loved using Flipgrid. Since that is going away, I am trying to figure out how to use Flip in teams so my students can post video responses.
I am unable to add Flip as a channel. I absolutely loved using Flipgrid. Since that is going away, I am trying to figure out how to use Flip in teams so my students can post video responses. Read More
Windows 11 Laptop asking for a PIN which I forgot, and it will not read my fingerprint neither
I can’t access my HP Envi X360 Win 11 Laptop. It is asking me to enter a PIN which I don’t have/remember as I’ve used my fingerprint sensor to access my laptop. How can I access it without having to resort to a system recovery? I’ve Music applications, with lots of Plug-Ins that I don’t want to reinstall not to mention all the Windows updates etc. Please advise. Thanks
I can’t access my HP Envi X360 Win 11 Laptop. It is asking me to enter a PIN which I don’t have/remember as I’ve used my fingerprint sensor to access my laptop. How can I access it without having to resort to a system recovery? I’ve Music applications, with lots of Plug-Ins that I don’t want to reinstall not to mention all the Windows updates etc. Please advise. Thanks Read More
:) Are there Golf players here?
Now it’s a new discovery for me, but it’s great fun and you can get rid of unnecessary kilograms.
This is a big surprise for me, I didn’t think that I would ever start to be interested
such a sport!
I’ve already lost a dozen balls, or did you start like that, I couldn’t even hit the ball – was it very funny?
Maybe I should stop getting tired :weary_face:?
Now it’s a new discovery for me, but it’s great fun and you can get rid of unnecessary kilograms.This is a big surprise for me, I didn’t think that I would ever start to be interestedsuch a sport!I’ve already lost a dozen balls, or did you start like that, I couldn’t even hit the ball – was it very funny?Maybe I should stop getting tired :weary_face:? Read More
Replacing a never-used classic root site with always & currently-used modern site
We never did anything with our root site because the classic was the only option when we started and at the time our license would not allow us to replace the classic site with a modern one, so we simply set up a modern communications site and have been using it as our home site for years. At some point, MS changed the rules and now our license allows us to replace the classic root site with a modern site.
I have read everything that MS has out there on the matter, but I’m still worried that the swap won’t go smoothly. Every time I ask for help or tips, no one seems to understand that there is nothing in the current root site and that I could care less about what happens to it, all I care about is the modern communication site we have been using as our home site.
When MS says to make sure that the replacement site has the same permissions as the root site, is that because the replacement site will bring its permissions with it or because it will inherit the permissions from the root site?
Does anyone have any tips or suggestions for me regarding this kind of swap? Please don’t tell me anything about what will happen to the classic root site, I truly could care less what happens to it, it’s nothing more than a peice of trash for the janitor to sweep up. All I care about it the modern communication site and my users ability to continue to access it. I do plan to have everyone update bookmarks, but the redirects should make that easier.
Thank you to anyone who can help reduce my anxiety over this swap.
We never did anything with our root site because the classic was the only option when we started and at the time our license would not allow us to replace the classic site with a modern one, so we simply set up a modern communications site and have been using it as our home site for years. At some point, MS changed the rules and now our license allows us to replace the classic root site with a modern site. I have read everything that MS has out there on the matter, but I’m still worried that the swap won’t go smoothly. Every time I ask for help or tips, no one seems to understand that there is nothing in the current root site and that I could care less about what happens to it, all I care about is the modern communication site we have been using as our home site. When MS says to make sure that the replacement site has the same permissions as the root site, is that because the replacement site will bring its permissions with it or because it will inherit the permissions from the root site? Does anyone have any tips or suggestions for me regarding this kind of swap? Please don’t tell me anything about what will happen to the classic root site, I truly could care less what happens to it, it’s nothing more than a peice of trash for the janitor to sweep up. All I care about it the modern communication site and my users ability to continue to access it. I do plan to have everyone update bookmarks, but the redirects should make that easier. Thank you to anyone who can help reduce my anxiety over this swap. Read More
Microsoft Copilot for Security Now Covered by HIPAA Business Associate Agreement (BAA)
We are pleased to announce that Microsoft Copilot for Security is now listed and covered by a Business Associate Agreement (BAA), which is crucial for healthcare providers subject to Health Insurance Portability and Accountability Act (HIPAA) regulations. This ensures that all Protected Health Information (PHI) managed by Copilot for Security receives the highest levels of security and confidentiality. Healthcare providers can confidently integrate Copilot for Security into their operations, knowing it meets HIPAA’s rigorous PHI protection requirements.
Under HIPAA compliance, Copilot for Security employs comprehensive administrative, physical, and technical safeguards. Administrative safeguards include policies and procedures to manage and protect PHI effectively. Physical safeguards ensure secure environments for electronic PHI, employing measures like access controls and secure storage facilities. Technical safeguards utilize encryption, access controls, and audit controls to prevent unauthorized access to electronic PHI.
The availability of a HIPAA-compliant AI security product like Microsoft Copilot for Security is critical to providing healthcare customers with the security capabilities they need to ensure continuous operations. Government agencies recently reported that ransomware attacks in the US healthcare sector were up 128% in 2023, directly increasing the risk of hospitals having to delay procedures and patient care. Integrating the AI-driven capabilities of Copilot for Security in healthcare settings allows for healthcare organizations to leverage advanced security features while maintaining compliance with regulatory standards to ensure that patient data remains protected.
Microsoft upholds its responsibilities under the BAA by safeguarding PHI and preventing its unauthorized use or disclosure. Rapid reporting of any unauthorized access to unencrypted PHI ensures that healthcare organizations can respond swiftly to potential security breaches. Detailed documentation of security measures and compliance efforts further demonstrates Microsoft’s commitment to protecting patient data and upholding HIPAA standards.
Integrated with Microsoft’s extensive security portfolio, Copilot for Security offers healthcare organizations advanced tools to manage cybersecurity effectively. Generative AI-powered threat detection enhances proactive monitoring and response capabilities, minimizing the risk of data breaches. Automation of compliance processes supports ongoing adherence to HIPAA regulations, reducing administrative burden and ensuring continuous data protection.
Microsoft Copilot for Security has already achieved other essential data protection compliance certifications, including ISO 27001, 27017, 27018, 20000-1, 9000-1, and 22301. Achieving these compliance certifications underscores our ongoing dedication to enhancing security and privacy standards for our products.
To begin your journey with Copilot for Security, visit our dedicated Copilot for Security page. There, you can discover how this innovative tool empowers security professionals to swiftly respond to cyberthreats, process signals at machine speed, and assess risk exposure.
For a firsthand experience of Copilot for Security’s capabilities, reach out to our sales team to request a personalized demo or a quote. We’re here to support you every step of the way.
Microsoft Tech Community – Latest Blogs –Read More