I need to configure email settings for a number of CRM online instances. I want to automate this as some of the sandbox environments will be reset periodically.
I have one instance configured manually (with our on prem exchange) so know what need to be done to get it working but I can't for the life of me seem to be able to retrieve and update the email server profile configuration. I either want to amend the default profile or create a new one.
I'm using the Microsoft.Xrm.Data.Powershell module so i'm able to retrieve entities and records but can't seem to find the specific data i'm after.
Has anybody done this before or able to point me in the right direction?
While I have never done this myself here are some ideas that might help:
The EmailServerProfile entity supports the typical CRUD messages, as well as specialized messages like GrantAccess, ModifyAccess, and RevokeAccess.
Options to run these from PowerShell would include:
Use PowerShell to make requests to the D365 WebAPI, which will require OAuth2
Install the Microsoft SDK Nuget Package(s) into PowerShell, load the appropriate assemblies, then create the .NET objects and run their methods. This post has more info on this type of approach.
This package says it allows you to "invoke any available CRM request", so that might be worth looking into.
I checked this package, which has a lot of commands, including Approve-CrmEmailAddress and Revoke-CrmEmailAddress but did not see anything pertaining to EmailServerProfile.
Here is an example of how I create a fully working hybrid profile in on premise Dynamics installation:
New-CrmRecord -EntityLogicalName emailserverprofile -Fields #{
name = "EmailProfile01"
servertype = [Microsoft.Xrm.Sdk.OptionSetValue]::new("3")
ownerid = $ownerIdReference
exchangeonlinetenantid = $CRMContextId.Guid
useautodiscover = $true
incomingcredentialretrieval = [Microsoft.Xrm.Sdk.OptionSetValue]::new("2")
}
Related
In our company we automated certain things for our customers:
Reporting, (counting Azure AD accounts, systems, mailboxes);
Create user (setting all permissions);
Create mailboxes;
managing tickets in ITSM;
Delete user .
We did use a lot of Powershell scripts and Azure Devops to automate these tasks. Now with the deprecation of basic authentication, we had to change our scripts and the way of authentication to all of our customers' Exchange Online. This made us think, is there a better way to set this up not to have these problems? We are already working with configfiles, modules, classes in our scripts.
What would be the best way to automate these tasks and not have the rework when Microsoft changes the authentication method?
Another question what would be a way to automate these tasks in low code?
The situation is that we make connection with the Azure Platform from our customers.
If you already work with modules and classes you should probably write a single "authentication" module/class that is then used in all of the subsequent scripts. If and when MS change the authentication method again - one only needs to change this one class that is called by every other script.
In terms of "low code" - it depends on what these tasks are doing.. but, one is able to use the Power Platform Office365 Connector and from there it is possible to query AAD. There is also the GraphAPI.
It really depends on your use case but the following link may be of some assistance with the "low code" question:
https://powerusers.microsoft.com/t5/Building-Power-Apps/Query-Active-Directory/td-p/724376
I've been trying to implement a way to download all the changes made by a particular user in salesforce using PowerShell script & create a package The changes could be anything whether it can be added or modified, Apex classes, profiles, Account, etc based on the modified by the user, component ID, timestamp, etc. below is the URL that exposes the API. The URL Does not explain any way to do this by using a script.
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_listmetadata.htm
Does anyone know how I can implement this?
Regards,
Kramer
Salesforce orgs other than scratch orgs do not currently provide source tracking, which makes it possible to pinpoint user changes in metadata and extract only those changes. This is done by an SFDX/Metadata API client, like Salesforce DX or CumulusCI (disclaimer: I'm on the CumulusCI team).
I would not try to implement a Metadata API client in PowerShell; instead, harness one of the existing tools to do so.
Salesforce orgs other than scratch orgs don't provide source tracking at present. To identify user changes, you can either
Attempt to extract all metadata and diff it against your version control, which is considerably harder than it sounds and is implemented by a variety of commercial DevOps tools for Salesforce (GearSet, Copado, etc).
Have the user manually add components to a Change Set or Unmanaged Package, and use a Metadata API client as above to retrieve the contents of that package. (Little-known fact, a Change Set can be retrieved as a package!)
To emphasize: DevOps on Salesforce does not work like other platforms. Working on the Metadata API requires a fair amount of time investment and specialization. Harness the existing work of the Salesforce community where you can, but be aware that the task you are laying out may be rather more involved than you think and it's not necessarily something you can just throw together from off-the-shelf components.
In my company where we use AD infrastructure my working hours in outlook somehow change from working hours and my time-zone. I created a script that changes the time-zone, but don't know how to change the working hours in outlook.
QUESTIONS:
searching for POWER-SHELL OUTLOOK API gave no results - wanted to ask how to approach scripting the outlook application (or any other application) with powershell? What is the development process step-by-step? Is there an API defined for each application for powershell?
How does powershell interact with applications? Is there a general command-object infrastructure for all windows applications that powershell accesses?
And for the specific question: how to actually change the working hours in OUTLOOK?
Thank you?
Powershell can use any IDispatch-based libraries, including the Outlook Object Model. But OOM however does not provide any way to set those options. If using Redemption is an option (I am its author), you can use its RDOCalendarOptions object - next version of Redemption will expose RDOCalendarOptions.WorkDays/WorkDayStart/etc. properties.
I'm trying to add some entities via a SOAP client, to MS Dynamics (online). My client is not a Microsoft client.
Do you know a way to retrieve the schema of Entities like Account, Prospect etc... I would like to know how . I really need to know it , for integration with different installations of Dynamics.
I'd like to know the fields and when to put a String a Boolean etc.
I use a Demo instance of MS CRM online, from scratch, I did not change anything
Thanks!!
You can get metadata about an entity or just one attribute on an entity by using a request. Here is a link to an example
http://msdn.microsoft.com/en-us/library/gg594428.aspx
If you are looking to retrieve this information programmatically then follow Kevin Ross's answer above.
If you want to browse this information you can use the SDK Metadata Browser solution.
The Dynamics CRM Metadata Browser is in the SDK (SDK\Tools\MetadataBrowser). You can download the SDK from http://www.microsoft.com/en-us/download/details.aspx?id=40321.
Follow the README.DOCX that is in the SDK\Tools\MetadaraBrowser and you'll be able to see all the information necessary for manually building your SOAP calls.
Here is what it looks like:
I have a workflow that has a 'Prompt and Response' dialogue. I can run the workflow from the API using ExecuteWorkflowRequest but how do I provide values for the prompt and response inputs?
Workflows don't take parameters.
Dialogs take parameters, which are generally passed from other dialogs or queries.
The only thing I managed to do is to pass a related entity from parent workflow as the primary entity to a child workflow.
I'm going to retract my earlier answer and upvote #Grigory instead.
See this page from the SDK
Note Due to the interactive nature of the dialog process, you cannot run a dialog using the Microsoft Dynamics CRM SDK. A dialog can
only be run through the Microsoft Dynamics CRM Web application and are
not supported in Microsoft Dynamics CRM for Microsoft Office Outlook
with Offline Access.
I don't know the answer, but I'd be fairly confident that this is:
Possible
Unsupported (as it is not documented in the SDK)
If I really needed to find out then I'd write a plugin to explore what happens when a workflow is fired internally (this makes an assumption that such a message is fired via the plugin pipeline - not necessarily a correct assumption).
I'd register this plugin on all stages of the Execute message (I assume) and then use debug logging or an interactive debug session (attached to the Async service) to examine the InputParameters (and maybe OutputParameters and ExtensionData) of the ExecuteWorkflowRequest that is (hopefully) generated when CRM runs a workflow that does have parameters. I expect that one of those PropertyBags will contain some sort of parameter.